在安裝pip的出現例外提示:
ERROR: Could not find a version that satisfies the requirement pillow (from versions: none) ERROR: No matching distribution found for pillow
錯誤說了,找不到這個pillow,所以出現安裝例外,
如何安裝pip?
a、電腦系統:windows
b、永久修改使用安裝方法
c、準備鏡像地址,如下:
清華大學:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
華中理工大學:http://pypi.hustunique.com/
山東理工大學:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
華中科技大學:http://pypi.hustunique.com/
百度: https://simple.baidu.com/pypi/simple
步驟開始:
1、在系統C盤根目錄的用戶(users)檔案夾找到當前的正在使用電腦的用戶:【C盤\用戶\當前用戶】
2、新建檔案夾pip,新建txt文本【注意點查看,勾選檔案擴展名】,把txt文本改為:pip.ini


3、雙擊打開這個檔案,復制下面代碼,粘貼進入檔案,CTRL+S保存,
[global] index_url=【上面的鏡像地址:如】http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=【上面的鏡像地址第一個/以前的字母:如】mirrors.aliyun.com
4、WIN+R打開電腦運行視窗,輸入CMD,打開命令視窗,在命令視窗輸入以下代碼:
pip install pillow
5、回車,顯示如下資訊,其中有Successfully,表示安裝成功,
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Collecting pillow Downloading http://mirrors.aliyun.com/pypi/packages/18/c5/fbbcab5cc53c4278c1843d985c6e8e80c79f993c6c1e07f587f34afc76ee/Pillow-9.4.0-cp37-cp37m-win_amd64.whl (2.5 MB) |████████████████████████████████| 2.5 MB 437 kB/s Installing collected packages: pillow Successfully installed pillow-9.4.0 WARNING: You are using pip version 20.1.1; however, version 22.3.1 is available. You should consider upgrading via the 'e:\python\python.exe -m pip install --upgrade pip' command.
現在我說說我出項的例外是為啥:就是缺少了,如下代碼:
[install]
trusted-host=【上面的鏡像地址第一個/以前的字母:如】mirrors.aliyun.com
大概應該就是表示,缺少具體的物件,無法找到具體的指向去下載安裝相應的資訊,
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/541416.html
標籤:Python
下一篇:分布式事務解決方案-后端分析
