导入Python Imaging Library时出现DLL错误

时间:2018-01-19 09:38:00

标签: python

我在使用scikit-image模块skimage时遇到了麻烦:

from skimage import io

img = io.imread('mire.jpg', as_grey=True)
io.imshow(img)

这是我收到的错误消息:

runfile('C:/Users/Niz/Documents/MIX/M1/S2/TRAITEMENT DE DONNEES D\'IMAGES/TP 01/TP_image_convolution/test skimage.py', wdir='C:/Users/Niz/Documents/MIX/M1/S2/TRAITEMENT DE DONNEES D\'IMAGES/TP 01/TP_image_convolution')
Traceback (most recent call last):

  File "<ipython-input-1-514bc33b76c2>", line 1, in <module>
    runfile('C:/Users/Niz/Documents/MIX/M1/S2/TRAITEMENT DE DONNEES D\'IMAGES/TP 01/TP_image_convolution/test skimage.py', wdir='C:/Users/Niz/Documents/MIX/M1/S2/TRAITEMENT DE DONNEES D\'IMAGES/TP 01/TP_image_convolution')

  File "C:\Users\Niz\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "C:\Users\Niz\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/Niz/Documents/MIX/M1/S2/TRAITEMENT DE DONNEES D'IMAGES/TP 01/TP_image_convolution/test skimage.py", line 8, in <module>
    from skimage import io

  File "C:\Users\Niz\Anaconda3\lib\site-packages\skimage\io\__init__.py", line 7, in <module>
    from .manage_plugins import *

  File "C:\Users\Niz\Anaconda3\lib\site-packages\skimage\io\manage_plugins.py", line 28, in <module>
    from .collection import imread_collection_wrapper

  File "C:\Users\Niz\Anaconda3\lib\site-packages\skimage\io\collection.py", line 12, in <module>
    from PIL import Image

  File "C:\Users\Niz\Anaconda3\lib\site-packages\PIL\Image.py", line 56, in <module>
    from . import _imaging as core

ImportError: DLL load failed: Le module spécifié est introuvable.

我使用anaconda Spyder在Windows 10上运行python 3.6.4,并使用以下方法安装了scikit-image:

conda install scikit-image

我已查看了主题并尝试安装 numpy-mkl 和一些可视化c ++库,但我仍然收到相同的错误消息。

对不起英语不好,法语发言者在这里!感谢您提前帮助。

1 个答案:

答案 0 :(得分:3)

由于这个帖子问题解决了:PIL: DLL load failed: specified procedure could not be found

4.0.0版似乎正在运行枕头修复了我的问题:

conda uninstall pillow
pip install pillow==4.0.0

然后再次安装scikit-image

conda install scikit-image