当我运行来运行xgboost时,它似乎影响了很少的运行包,其中之一就是PIL。它运行正常,直到我运行康达锻造,但现在我得到了以下错误。
ImportError Traceback (most recent call last)
<ipython-input-3-588a23339ee5> in <module>()
5 import matplotlib.pyplot as plt
6 import scipy
----> 7 from PIL import Image
8 #from pillow import Image
9 from scipy import ndimage
C:\Anaconda3\lib\site-packages\PIL\Image.py in <module>()
54 # Also note that Image.core is not a publicly documented interface,
55 # and should be considered private and subject to change.
---> 56 from . import _imaging as core
57 if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
58 raise ImportError("The _imaging extension was built for another "
ImportError: DLL load failed: The specified module could not be found.当我试图再次使用安装pil时,我会得到以下错误消息
(C:\Anaconda3) C:\Users\P Srinivasa Rao>conda install pil
Fetching package metadata ...............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- pil -> python 2.6*
- python 3.6*
Use "conda info <package>" to see the dependencies for each package.然后,我安装了枕头,这似乎很顺利。但是,当我从PIL导入映像运行时,仍然会得到与上面相同的错误。我尝试从枕头导入图像,它说没有发现模块命名为枕头。
对于如何解决这个问题,让PIL重新开始工作有什么建议吗?
我在windows 10,64位上使用anaconda3。
发布于 2018-05-17 17:25:44
问题在于,您有python2.x版本和3.x版本。尝试以下几点
我发现枕头4.0.0在3.6上使用时是最稳定的。
https://stackoverflow.com/questions/47592182
复制相似问题