pip.ini鏡像源

pip ssl certificate verify failed

之前pip很多時候報錯ssl連接錯誤,網上說是鏡像不支持,那就換吧,改pip.ini文件,同事幫我改成這樣了,以為醬紫就好了,可還是不能用
果斷重裝,啥的,之后好了,然后現在隨便pip,飛快~

使用命令:

  1. pip install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org pythonPackage解決,其中的pythonPackage改為對應得庫名,如scrapy
  2. pip install pythonPackage -i https://pypi.doubanio.com/simple --trusted-host pypi.douban.com
    豆瓣源https://pypi.doubanio.com/simple
##一勞永逸的源
C:\Users\xxxx\AppData\Roaming\pip.ini
[global]
index-url = https://pypi.douban.com/simple
#index-url = https://pypi.tuna.tsinghua.edu.cn/simple
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
[install]
trusted-host = pypi.douban.com
trusted-host = mirrors.ustc.edu.cn
trusted-host = pypi.python.org

btw:將包保存為文本
pip list >pip1.txt
pip freeze --all >pip2.txt

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容