ImportError: cannot import name 'ImageTk'解决方法

1.缺少引用的原因。解决方案

from PIL import ImageTk

2.PIL库中找不到ImageTk

解决方案

for python2

sudo apt-get install python-imaging python-imaging-tk

for python3

 sudo apt-get install python3-pil python3-pil.imagetk

你可能感兴趣的:(python,python)