Mac上python 在终端使用pip3安装包报ConnectTimeoutError错误

报错:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken…
翻译:对于该包的下载地址连接超时,默认的pip源速度太慢了
解决方法:使用国内的镜像服务,可以手动指定源
国内镜像服务源:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
用法:pip3 install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

参考博客:
https://blog.csdn.net/qq_25964837/article/details/80295041
https://www.jianshu.com/p/3ff34df37fce

猜你喜欢

转载自blog.csdn.net/thj19980720/article/details/81349001