美文网首页
Mac 在终端使用pip3安装包报ConnectTimeoutE

Mac 在终端使用pip3安装包报ConnectTimeoutE

作者: 没八阿哥的程序 | 来源:发表于2019-07-08 13:03 被阅读0次

报错:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken…
翻译:对于该包的下载地址连接超时,默认的pip源速度太慢了
默认的pip源几次下载后都是报超时错误,而且速度慢的真的让人无法忍受,查阅了一下资料后,发现可以更改下载源。
解决方法:使用国内的镜像服务,可以手动指定源
国内镜像服务源:
阿里云 https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 https://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple/
用法:

pip3 install opencv-python -i  https://mirrors.aliyun.com/pypi/simple/ --trusted-host https://mirrors.aliyun.com/

相关文章

网友评论

      本文标题:Mac 在终端使用pip3安装包报ConnectTimeoutE

      本文链接:https://www.haomeiwen.com/subject/sovufctx.html