简体   繁体   English

无法导入 PIL ModuleNotFoundError: No module named 'PIL'

[英]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.

相关问题 ModuleNotFoundError:没有名为“PIL”的模块,ImageTk - ModuleNotFoundError: No module named 'PIL', ImageTk 导入 matplotlib.backends.backend_tkagg - ModuleNotFoundError:没有名为“PIL”的模块 - import matplotlib.backends.backend_tkagg - ModuleNotFoundError: No module named 'PIL' Python - 将图像导入为 PIL_Image ModuleNotFoundError:没有名为“图像”的模块 - Python - import Image as PIL_Image ModuleNotFoundError: No module named 'Image' Heroku PIL ModuleNotFoundError:没有名为“图像”的模块 - Heroku PIL ModuleNotFoundError: No module named 'Image' 获取错误:ModuleNotFoundError:没有名为“PIL”的模块 - Getting Error: ModuleNotFoundError: No module named 'PIL' 如何解决“ModuleNotFoundError: No module named 'PIL'”的问题? - How to fix problem of “ModuleNotFoundError: No module named 'PIL'”? Python 3.8 ModuleNotFoundError:没有名为“PIL”的模块 - Python 3.8 ModuleNotFoundError: No module named 'PIL' ModuleNotFoundError:没有名为“PIL”的模块用于虚拟环境 - ModuleNotFoundError: No module named 'PIL' For virtual Environment 从 PIL 导入图像 - 导入错误:没有名为 PIL 的模块 - from PIL import Image - ImportError: No module named PIL 使用枕头导入图像:没有名为“ PIL”的模块 - Import Image using Pillow : No module named 'PIL'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM