小编C.B*_*uhl的帖子

PIL:ImportError:_imaging扩展是为另一个版本的枕头或PIL构建的

我收到错误:

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

C:\Anaconda\lib\site-packages\PIL\Image.py in <module>()
     61     from PIL import _imaging as core
     62     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
---> 63         raise ImportError("The _imaging extension was built for another "
     64                           " version of Pillow or PIL")
     65 

ImportError: The _imaging extension was built for another  version of Pillow or PIL
Run Code Online (Sandbox Code Playgroud)

每当我尝试使用PIL库时.我正在尝试加载和处理一堆.gif文件,而我现在正在尝试的是以下内容:

from PIL import Image
Run Code Online (Sandbox Code Playgroud)

尝试不同的方法,通过scipy:

import scipy.ndimage as spnd
os.chdir('C:\\WeatherSink\\data\\')
spnd.imread('2014-11-03-0645.gif')
Run Code Online (Sandbox Code Playgroud)

失败:

--------------------------------------------------------------------------- …
Run Code Online (Sandbox Code Playgroud)

python python-imaging-library python-2.7

18
推荐指数
2
解决办法
2万
查看次数