【python安装】pip安装包出现Retrying (Retry(total=4, connect=None,

报错:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef2a8f8320>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/setuptools/

分析:数据源有问题。要更换python的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/

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

使用命令(比如使用豆瓣):

pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

猜你喜欢

转载自blog.csdn.net/qq_30159015/article/details/84584210