有时候按照 添加清华源之后,可能仍然会提示:
1 2 3 4 5 6 7 8 9 10 11 12 |
Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/osx-64/repodata.json.bz2> 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. If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team. ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/free/osx-64/repodata.json.bz2 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe40ad6ca58>, 'Connection to repo.anaconda.com timed out. (connect timeout=9.15)'))")) |
这主要是因为我们没有把默认的channels
删除,按照下面步骤删除即可~
vi ~/.condarc
把defaults
这一行删除即可~删除后的.condarc
长这样:
1 2 3 4 5 |
channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ show_channel_urls: true |