首页 > 解决方案 > 在 conda 中创建环境时如何修复错误

问题描述

我有一台新的办公笔记本电脑,第一次安装了 anaconda 和 pycharm。在尝试通过 pycharm 界面中的终端创建新环境时,出现以下错误

PS C:\Users\xxxx\PyProjects> conda env list
# conda environments:
#
base                  *  C:\Users\xxxx\Anaconda3

PS C:\Users\xxxx\PyProjects>  conda create -n newenv37 python=3.7
Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
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.

'https://repo.anaconda.com/pkgs/main/win-64'

似乎是什么问题?我可以在我的笔记本电脑上打开 anaconda 网站,所以看起来它不会被阻止。感谢任何帮助,因为我来自非技术背景。

标签: pycharmanaconda

解决方案


我遇到过同样的问题。我可以通过禁用 ssl 来修复它。

在您的系统上查找 .condarc 文件。在 Windows 中,它位于 c:/users/ 并设置 ssl_verfiy: false

如果该文件不存在,则只需创建一个具有提及名称的文件。该文件的内容将是:

ssl_verfiy:虚假频道:- 默认值


推荐阅读