Python 如何在 Spyder(Anaconda 3)上安装 PIL?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/46717354/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 17:47:25  来源:igfitidea点击:

How to install PIL on Spyder(Anaconda 3)?

pythonpython-imaging-librarypillow

提问by Ankan Das

This is the problem when I go on to install using conda install PIL It gives me this:

这是我继续使用 conda install PIL 进行安装时出现的问题 它给了我这个:

UnsatisfiableError: The following specifications were found to be in conflict:
  - pil -> python 2.6*
  - python 3.6*

回答by Mike Müller

PIL seems not maintained any more. Just install pillow:

PIL 似乎不再维护。只需安装枕头:

conda install pillow

and use just as if you had PIL installed :

并像安装了 PIL 一样使用:

from PIL import Image

回答by Vikash kumar

I'm able to fix issue by installing pillow version 5,please try once.

我可以通过安装枕头版本 5 来解决问题,请尝试一次。

conda install --channel conda-forge pillow=5

回答by Jayesh Baviskar

use

from pil import Image

instead of

代替

from PIL import Image