在重新创建虚拟环境诗出现错误:CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/current_repodata.json
解决方法
1.添加清华镜像网站
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --set show_channel_urls yes
2.更改镜像源文件.condarc
.condrac文件路径一般在:C:\Users\username.condarc,我在查找过程中发现我的电脑中没有该文件,通过查找资源,发现原来.condarc默认是不会自动创建的,只有当用户第一次使用conda config命令时,系统才会自动创建.condarc文件。
生成 .condarc 文件
conda config --set show_channel_urls yes
生成 .condarc 文件,然后找到该文件并修改。
找到.condrac文件删除 - defaults 所在的一整行内容即可。
3. 重新创建新的虚拟环境
conda create -n 环境名 python=xxx #自己的python版本