Tuesday, February 25, 2020

ImportError: cannot import name 'ImageTK'

Ref: https://stackoverflow.com/questions/44835909/cannot-import-name-imagetk-python-3-5/48170806

from PIL import Image, ImageTK
ImportError: cannot import name 'ImageTK'

Solved
For Debian/Ubuntu:
Python 2
sudo apt-get install python-imaging python-pil.imagetk
Python 3
sudo apt-get install python3-pil python3-pil.imagetk
For Archlinux:
sudo pacman -S python-pillow  
It will install the package and you can use it: from PIL import ImageTk

No comments:

Post a Comment

Popular Posts