ImportError: cannot import name 'ImageTk'解决方法
程序员文章站
2022-04-25 22:13:42
...
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
推荐阅读
-
pycharm读取图片,提示ImportError: cannot import name imread解决方法
-
ImportError: cannot import name 'cross_validation' from 'sklearn'
-
cannot import name 'Flask' from 'flask'
-
ImportError: cannot import name 'Optional'
-
Python中使用Enum类时出现cannot import name ‘Enum‘ from partially initialized module ‘enum‘
-
cannot import name ‘Graph‘ from ‘pyecharts‘
-
解决pyecharts importerror问题:cannot import name ‘bar’ from pyecharts
-
ImportError: cannot import name ‘Bar‘ from ‘pyecharts‘ (D:\Anaconda3-2019.03\Anaconda3\lib\site-pack
-
2021-06-13cannot import name ‘Bar‘ from ‘pyecharts.charts‘ (C:\Users\SieburgShen\AppData\Roaming\Pyt
-
解决pyecharts导包报错 cannot import name 'Bar