python安装包出现WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))

记录一下,避免再次掉坑

如图所示
python安装包出现WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))_第1张图片
查了查,说是默认的pip源的问题,这里可以使用国内的镜像

国内的一些pip源:

阿里云 http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

使用方法:在后面直接 -i 加 url

C:\WINDOWS\system32>pip install 包名.whl -i http://pypi.mirrors.ustc.edu.cn/simple/

如果报错
在这里插入图片描述
则在后面加上–trusted-host pypi.mirrors.ustc.edu.cn

C:\WINDOWS\system32>pip install 包名.whl -i http://pypi.mirrors.ustc.edu.cn/simple --trusted-host pypi.mirrors.ustc.edu.cn

你可能感兴趣的:(python)