Windows安装PIL,提示“No matching distribution found for pillow”的解决方法

windows下按照PIL,提示一下错误:

错误原因:
1.后来找了很多方法,发现我的电脑是64位的,而官网只提供32位的,就是自己去官网下载的其他PIL
2.没有对应的版本,我python 3.6.0

下载官网提供的.whl文件

地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/
里面有很多包,页面查找Pillow,下载对应python版本的文件。
如我的是python 3.6.0,则下载Pillow‑3.4.2‑cp36‑cp36m‑win_amd64.whl

安装.whl文件

在.whl文件目录下运行cmd命令

pip install Pillow-3.4.2-cp36-cp36m-win_amd64.whl

安装成功

引用PIL

官网也说了“a replacement for PIL, the Python Image Library, which provides image processing functionality and supports many file formats.
Use from PIL import Image instead of import Image.”
Python图像包,引用由原来的import Image改为from PIL import Image

posted @ 2020-03-25 11:14  j44p5  阅读(10400)  评论(0编辑  收藏  举报