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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM