pip超时了,这样
pip --default-timeout=100 install XXX
但还是超时,
pip --default-timeout=1000 install XXX
嘿嘿嘿,成功了
后来发现可以更改临时镜像,国内镜像源:
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
豆瓣:http://pypi.douban.com/simple/
使用pip临时更换镜像源
pip 后面 加上 -i参数,再加上面的镜像源即可,示例如下:
pip install requests -i http://mirrors.aliyun.com/pypi/simple/
还有一种情况,就是使用pip3的时候,一直有一段黄字提示用sudo -H的情况
sudo -H pip3 install xxx
参考:https://blog.csdn.net/weixin_39020133/article/details/105495144