Conda创建虚拟环境Http错误解决方法

Conda创建虚拟环境Http错误解决方法

最近在使用Conda创建虚拟环境时,在执行conda create --name xxx时出现了一个奇怪的错误:

raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch/current_repodata.json

通过观察发现这个URL是清华的镜像源,因此可以尝试删除自己原来添加的镜像源,并恢复原来的镜像源,代码如下:

conda config --remove-key channels
conda config --append channels conda-forge --append channels bioconda --append channels defaults

通过上述操作,成功解决问题,特此记录。

你可能感兴趣的:(深度学习,Python基础,项目开发,conda,python,开发语言)