安装PIL时报错
:C:\Users\admin>pip install PIL
Collecting PIL
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
1、软件版本
python 3.6
pip是 18.0
2、错误原因:
后来找了很多方法,发现我的电脑是64位的,而官网只提供32位的,就是自己去官网下载的其他PIL,
也是32位的。
3、解决方法:找一个非官方的64位大家通用的PIL安装
(1)打开网址
http://www.lfd.uci.edu/~gohlke/pythonlibs/(2)搜索PIL(ctrl+F),找到下面的图片所示,如果你的python是2.7版本就下载cp27的,3.6就下载cp36
(3)还要先安装wheel。选择相应版本下载后,打开cmd(win+r),你要先安装pip,具体pip安装百度一下怎么安装,
输入pip install wheel 后如图所示
(4)wheel安装好后,找到我们下载好的Pillow-5.2.0-cp36-cp36m-win_amd64.whl(这是我的版本)
我打开cmd后,找到存放该文件的桌面,然后pip 安装就成功了
C:\Users\admin>pip install Pillow-5.2.0-cp36-cp36m-win_amd64.whl
Processing pillow-5.2.0-cp36-cp36m-win_amd64.whl
Installing collected packages: Pillow
Successfully installed Pillow-5.2.0
转自:https://blog.youkuaiyun.com/lhh31/article/details/51979293