[英]can not import PIL ModuleNotFoundError: No module named 'PIL'
I successfully installed PIL
.我成功安装了
PIL
。
But when create new project I can`t import PIL.但是当创建新项目时,我无法导入 PIL。
Error:错误:
(ModuleNotFoundError: No module named 'PIL')
I am using Python 3.8 and tkinter
.我正在使用 Python 3.8 和
tkinter
。
Usually this happens when the python environment you're running is not the same environment that pip is updating.通常,当您运行的 python 环境与 pip 正在更新的环境不同时,就会发生这种情况。 It's pretty common if you have more than one python installation.
如果您有多个 python 安装,这是很常见的。
Make sure that your OS environment variables for pip and python are directed toward appropriate script files of a particular install.确保 pip 和 python 的操作系统环境变量指向特定安装的适当脚本文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.