问题场景:
由于网速原因导致pip下载异常。
问题描述
报错情况如下:
Failed to establish a new connection: [Errno 11001] getaddrinfo failed,)
原因分析:
网速慢,或者涉及国外资源下载速度过慢。
解决方案:
将pip install 库名称 改为如下代码:
pip --default-timeout=100 install 库名称 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com