pip安裝第三方庫時報錯Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))...,詳細報錯見下圖:
報錯原因:
國外鏡像源連接問題導致
解決:
改為國內鏡像源下載
常用國內源:
清華: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/
以清華大學鏡像源下載為例:
一、直接使用鏡像源下載
二、配置默認使用某鏡像源下載
1,在路徑C:\Users\xxx新建pip目錄,在該目錄下新建pip.ini文件,將下面內容復制到pip.ini文件中,並保存
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
2,直接pip安裝第三方包
指令:pip install xxx(包名)