簡體   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