我在使用 PyCharm 时遇到错误,它不允许我导入 pillow 模块,即使我将它作为一个包安装在项目解释器中。非常感谢任何帮助!
请您参考如下方法:
虽然包的名称是 pillow,但它是 PIL 的替代品,并使用 PIL 作为基本模块的名称
通常的枕头使用方法是
from PIL import Image
im = Image.open("filename")
参见 tutorial , 和 documentation
我在使用 PyCharm 时遇到错误,它不允许我导入 pillow 模块,即使我将它作为一个包安装在项目解释器中。非常感谢任何帮助!
请您参考如下方法:
虽然包的名称是 pillow,但它是 PIL 的替代品,并使用 PIL 作为基本模块的名称
通常的枕头使用方法是
from PIL import Image
im = Image.open("filename")
参见 tutorial , 和 documentation