Ubuntu16.04上,之前好好的miniconda环境,现在想创建一个新环境,竟然报错了???
报错内容
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.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /pytorch/linux-64/current_repodata.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ad15b2290>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))"))
解决方法:
在你的跟目录环境下,找到.condarc
,在文件中添加
ssl_verify: false
添加完后,应该是这样的:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true
ssl_verify: false
这样应该就可以解决问题了。