anaconda3中的ImportError:DLL加载失败:找不到指定的模块

时间:2018-04-20 13:07:39

标签: python anaconda

我在Anaconda 3中运行了这个:

from PIL import Image

它显示DLL错误。我检查了Stackoverflow上的解决方案并做了相应的操作,但之后也出现了错误。

ImportError Traceback (most recent call last)
<ipython-input-14-b7f01c2f8cfe> in <module>()
----> 1 from PIL import Image

~\Anaconda3\envs\tensorflow\lib\site-packages\PIL\Image.py in <module>()
     56     # Also note that Image.core is not a publicly documented interface,
     57     # and should be considered private and subject to change.
---> 58     from . import _imaging as core
     59     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
     60         raise ImportError("The _imaging extension was built for another "

ImportError: DLL load failed: The specified module could not be found.

1 个答案:

答案 0 :(得分:2)

尝试从anaconda卸载软件包,然后使用pip安装它:

conda uninstall pillow:

Conda remove Pillow

用pip安装枕头:

pip install pillow