PIL 5.1无法正常工作

时间:2018-05-16 23:37:24

标签: python python-3.x image python-imaging-library

from PIL import Image

>>> from PIL import Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\appa\Python\miniconda\lib\site-packages\PIL\Image.py", line 60, in <module>
    from . import _imaging as core
ImportError: DLL load failed: The specified module could not be found

导入图片显示没有要导入的模块

Import PIL
PIL.Image
>>> import PIL
>>> PIL.Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'PIL' has no attribute 'Image'

同时显示相同的错误

我用过

conda install Pillow

已安装 Pillow = 5.1.1 ,我也尝试降级为 Pillow = 5.1.0

任何解决方案?我是否将它降级到较低版本才能使其正常工作,或者是否有我在安装过程中遗漏的内容。

1 个答案:

答案 0 :(得分:0)

尝试升级pip。使用pip install --upgrade pip