2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

BBox-Label-Toolをpython3.7で動かしたときのメモ

Last updated at Posted at 2019-08-03

はじめに

pyenvの元、BBox-Label-Toolを動かしてみようと試したメモです

環境

Ubuntu 18.04.2 LTS
pyenv
python 3.7.0

BBox-Label-Toolをダウンロード

% git clone https://github.com/puzzledqs/BBox-Label-Tool

python3では動かない

Environment
python 2.7
と書かれている。python3で動かしたい。きっと動かしている人がいるはずと思いIssuesを見てみる。

from tkinter import *
import tkinter.messagebox

これに変更すればよいらしいので、main.pyを書き換える。

main.py
# from Tkinter import *
# import tkMessageBox
from tkinter import *
import tkinter.messagebox

printの記述をpython3に合わせる

printにすべて括弧をつける。そんなに変更箇所は多くなかった。

python3-tkとtk-devをinstall

% sudo apt install python3-tk
% sudo apt install tk-dev

python 3.7.0の環境を新たに作る

% pyenv install 3.7.0

BBox-Label-Toolを起動

% python main.py
screenshot.png

動きました。
使い込んでみてないのでこの先の問題はまだ遭遇していませんが、たぶん大丈夫かな。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?