Skip to main content
 首页 » 编程设计

python之'导入错误 : No module named pillow' in PyCharm

2025年04月02日10Free-Thinker

我在使用 PyCharm 时遇到错误,它不允许我导入 pillow 模块,即使我将它作为一个包安装在项目解释器中。非常感谢任何帮助!

http://imgur.com/a/DfjC3

请您参考如下方法:

虽然包的名称是 pillow,但它是 PIL 的替代品,并使用 PIL 作为基本模块的名称

通常的枕头使用方法是

from PIL import Image 
im = Image.open("filename") 

参见 tutorial , 和 documentation