解决 Python pip 安装报错:Retrying (Retry(total=4, connect=None, read=None ...)) after connection

1. 在python中安装包时发生了如图所示bug,

解决 Python pip 安装报错:Retrying (Retry(total=4, connect=None, read=None ...)) after connection_第1张图片

原因是连接超时,所以需要自己设定安装源,

2. 解决方法:

在 pip命令后自己设定收集源(-i +url)

通过豆瓣:

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

3.问题解决:

解决 Python pip 安装报错:Retrying (Retry(total=4, connect=None, read=None ...)) after connection_第2张图片

你可能感兴趣的:(解决 Python pip 安装报错:Retrying (Retry(total=4, connect=None, read=None ...)) after connection)