ubuntu18.04建立新虚拟环境报错CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghu

ubuntu18.04建立新虚拟环境报错CondaHTTPError: HTTP 000 CONNECTION FAILED for url

在~主文件夹下打开.condarc文件夹

sudo gedit ~/.condarc

将里面的镜像修改为:

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

然后执行:

conda update conda

ubuntu18.04建立新虚拟环境报错CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghu_第1张图片解决了。

参考链接:https://blog.csdn.net/baicoo/article/details/108411067/

你可能感兴趣的:(pytorch,人工智能,python)