CondaHTTPError: HTTP 000 CONNECTION FAILED for url 问题处理

今天在用conda 给虚拟环境安装Python依赖包的时候,发现有一个节点一直安装失败,试了好几个方式都不行,卸载了Python重装也装不上,报错如下:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url 
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.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /anaconda/cloud/pytorch/linux-64/repodata.json (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))",),)

后面仔细检查了下网络,发现本机无法访问外网,于是给/etc/resolv.conf加上域名解析服务器,让其可以访问外网,再重试安装,发现装成功了

 

 

你可能感兴趣的:(Python,问题解决)