2022年6月6日月曜日

PillowをインストールしたのにImageTkでエラーが出る

pip3 install pillowを行ったのに以下のエラーが出る。

ImportError: cannot import name 'ImageTk' from 'PIL'

色々調べてみたらImageTkは、なぜか別でインストールする必要があるみたい。

sudo apt-get install python3-pil.imagetk

で解決した。