gpt4 book ai didi

python - 没有名为 Image tk 的模块

转载 作者:IT老高 更新时间:2023-10-28 20:23:30 25 4
gpt4 key购买 nike

我是python新手,请任何人帮忙

D:\python\sub>python app.py
Traceback (most recent call last):
File "app.py", line 2, in <module>
import ImageTk
ImportError: No module named ImageTk

最佳答案

这表示 python 安装在非标准位置,因此操作系统无法在标准位置找到 ImageTk。您可以在标准位置重新安装 Python,具体位置取决于您使用的操作系统和安装程序,或者将此位置附加到 sys.path。我使用的是 Ubuntu 13.04,我只需使用以下终端安装 ImageTk 包:

sudo apt-get install python-imaging-tk

关于python - 没有名为 Image tk 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10630736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com