An unexpected error has occurred. Conda has prepared the above report. 解决办法

When using miniconda to create a virtual environment, an error is reported:

An unexpected error has occurred. Conda has prepared the above report.

I found many methods on the Internet, all of which said:

method one

执行 conda clean --packages && conda clean --all && conda update --all

Method Two

delete this file

C:\Users[user_name].condarc

The above method may work, but if it doesn’t work after several attempts, the problem may be because you have enabled a VPN or a system proxy!
So the solution is: turn off the VPN or disable the proxy! ! ! Turn off the VPN or disable the proxy! ! ! Turn off the VPN or disable the proxy! ! ! .

-----------------------------------Dividing line------------- ----------------------
2022.2.20 Added:

If you want to open a proxy to download the python library, you can use the following method (win10 system, available for personal testing):

  • Run the following code to get the proxy address and port number:
>>> from urllib.request import getproxies
>>> getproxies()
{'https': 'http://127.0.0.1:xxxxx', 'http': 'http://127.0.0.1:xxxxx'}

xxxxx is the port number.

  • Add windows system variables:
    1. win+r, enter sysdm.cpl
    2. New in Advanced -> Environment Variables -> System Variables:
      insert image description here
    3. Restart the computer

Reference: https://github.com/conda/conda/issues/9794

Guess you like

Origin blog.csdn.net/weixin_43335465/article/details/121217306