繁体   English   中英

在Windows 10,64位的Anaconda上进行PIL安装

[英]PIL installation on anaconda for windows 10, 64 bit

当我运行conda-forge来运行xgboost时,似乎影响了几个正在运行的软件包,其中一个是PIL。 在运行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.

当我尝试使用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.

然后我安装了枕头,看起来好像进展顺利。 但是,当我从PIL导入映像运行时,仍然遇到与上面相同的错误。 我从枕头导入图像中尝试过,它说找不到名为枕头的模块

关于如何解决此问题并使PIL重新工作的任何建议?

我在Windows 10、64位上使用anaconda3。

该问题看起来您同时拥有pythons 2.x版本和3.x版本。 尝试以下

  1. 用python 3.6创建一个conda环境

     conda create -n pil-env python=3.6 
  2. 加载PIL

    康达安装枕头== 4.0.0

我发现Pillow 4.0.0在3.6上使用时最稳定

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM