Anaconda出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/..

1. Problem: conda cannot create a virtual environment and cannot install other third-party packages;

2. Reason: The default image source access speed is too slow;

3. Solution: Change the mirror source to Tsinghua mirror source, delete the default mirror source;
press Ctrl+H in the main directory, the display is as follows: insert image description here
Then replace the content in .condarc with the following:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  # - defaults
show_channel_urls: true
auto_activate_base: true

Then recreate the virtual environment again!
The specific display is as follows:insert image description here

Reference: link

Guess you like

Origin blog.csdn.net/weixin_56847236/article/details/130679619