[英]PIL installation on anaconda for windows 10, 64 bit
when I ran conda-forge to get xgboost running, it seems to have affected few running packages, one of them being PIL. 当我运行conda-forge来运行xgboost时,似乎影响了几个正在运行的软件包,其中一个是PIL。 It was running properly until I ran conda-forge, but now I am getting the following error. 在运行conda-forge之前,它运行正常,但是现在出现以下错误。
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.
when I try to install PIL again using conda install pil, I get the following error message 当我尝试使用conda install pil再次安装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.
I then installed pillow, which seems to have gone well. 然后我安装了枕头,看起来好像进展顺利。 But when I run from PIL import image, I still get the same error as above. 但是,当我从PIL导入映像运行时,仍然遇到与上面相同的错误。 I tried from pillow import image, it says no module found named pillow 我从枕头导入图像中尝试过,它说找不到名为枕头的模块
Any advice on how to resolve this issue and get PIL working again? 关于如何解决此问题并使PIL重新工作的任何建议?
I am using anaconda3 on windows 10, 64bit. 我在Windows 10、64位上使用anaconda3。
The problem looks like you have both pythons 2.x versions and a 3.x version. 该问题看起来您同时拥有pythons 2.x版本和3.x版本。 try the following 尝试以下
create a conda environment with python 3.6 用python 3.6创建一个conda环境
conda create -n pil-env python=3.6
load PIL 加载PIL
conda install Pillow==4.0.0 康达安装枕头== 4.0.0
I found Pillow 4.0.0 to be the most stable while using it on 3.6 我发现Pillow 4.0.0在3.6上使用时最稳定
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.