python-conda更新python(python升级)

 如果conda环境没问题,直接升级就好了:

conda install python=3.7

 如果出现如下错误:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url

试一试验证: 

conda config --set ssl_verify false

如果还不行,则需要更换源,先删除再添加: 

conda config --remove-key channels
vi ~/.condarc
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - defaults
show_channel_urls: true
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
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
  simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
ssl_verify: false

再运行一下就成功了:

conda install python=3.7

 python-conda更新python(python升级)_第1张图片

你可能感兴趣的:(python,Code-error,Ubuntu,python,开发语言,后端)