问题描述:
使用pip install产生如下报错
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, error(104, ‘Connection reset by peer’))’: /simple/numpy/
也百度了些方法,比如下面这些
https://blog.csdn.net/candice5566/article/details/82633680
pip install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
或添加其他国内镜像等等均无效果
最后发现问题出在了公司每天有流量限制。。。过一天再pip install就好了
同样的使用conda install出现如下错误也是这个原因
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://conda.anaconda.org/pytorch/linux-64/current_repodata.json
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(MaxRetryError(‘HTTPSConnectionPool(host=‘conda.anaconda.org’, port=443): Max retries exceeded with url: /pytorch/linux-64/current_repodata.json (Caused by SSLError(SSLError(“bad handshake: SysCallError(104, ‘ECONNRESET’)”,),))’,),)