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

使用 miniconda 创建虚拟环境的时候,报错:

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

网上找了很多方法,都是说:

方法一

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

方法二

删除这个文件

C:\Users[user_name].condarc

上述方法可能可以,但是如果试了好几次都不行的话,问题可能是因为你开了 VPN 或者 系统代理!
所以解决办法就是: 关掉VPN或禁用代理!!!关掉VPN或禁用代理!!!关掉VPN或禁用代理!!!

-----------------------------------分割线-----------------------------------
2022.2.20 添加:

如果想开代理下载python的库,可以使用以下方法(win10系统,亲测可用):

  • 运行以下代码获取代理地址和端口号:
>>> from urllib.request import getproxies
>>> getproxies()
{'https': 'http://127.0.0.1:xxxxx', 'http': 'http://127.0.0.1:xxxxx'}

xxxxx为端口号。

  • 添加windows系统变量:
    1. win+r,输入 sysdm.cpl
    2. 高级 -> 环境变量 -> 系统变量一栏中新建:
      在这里插入图片描述
    3. 重启电脑

参考:https://github.com/conda/conda/issues/9794

扫描二维码关注公众号,回复: 14842089 查看本文章

猜你喜欢

转载自blog.csdn.net/weixin_43335465/article/details/121217306
今日推荐