解决conda create虚拟环境报错:CondaHTTPError: HTTP 000…

电脑突然抽风

想安装paddlepaddle环境,创建一个虚拟环境居然报错

命令为:

conda create -n paddle python=3.9

报错内容

Solving environment: failed

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

SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/pro/win-64/repodata.json.bz2 (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])")))'))

尝试解决(没找到文件)

Windows修改:

找到.condarc文件(所在C盘–用户–用户名文件夹目录下)之后删除原来的内容,复制粘贴如下命令:

channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

其他博主说,保存退出,问题解决,然后就可以下载需要的包了。

这个文件我没找到,也没改。

一招解决

输入命令:

conda config --set ssl_verify false

通过这个命令行,对ssl认证进行关闭即可解决以上无法创建虚拟环境的报错。

问题解决,然后可以下载需要的包。

谢谢阅读。

作者:New_Rain.

物联沃分享整理
物联沃-IOTWORD物联网 » 解决conda create虚拟环境报错:CondaHTTPError: HTTP 000…

发表回复