Solve the problem of creating a Conda environment when the local proxy service of the Windows system is enabled

The error message is as follows

Collecting package metadata (current_repodata.json): failed

ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.

The solution is as follows

Create a Conda configuration file

 conda config

Then find the .condar file under the C:\Users[username] folder, and modify the file content as follows:

channels:
- defaults

# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True

proxy_servers:
    http: 127.0.0.1:PROXY_PORT
    https: 127.0.0.1:PROXY_PORT


ssl_verify: False

PROXY_PORT is the local proxy port, for example, my proxy server port is 4002, just change this to 4002, then save and exit, and reopen the terminal to create the environment to succeed!

Guess you like

Origin blog.csdn.net/qq_45724216/article/details/130286042