remove命令和show命令的使用(场景conda删除channel )

conda删除channel

今天装包,用conda install,发现清华的源貌似已经用不了。报错如下:

    CondaRuntimeError: Runtime error: Connection error: HTTPSConnectionPool(host
='mirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /anac
onda/pkgs/free/win-64/repodata.json (Caused by ConnectTimeoutError(<requests.pac
kages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000018726EF0>,
'Connection to mirrors.tuna.tsinghua.edu.cn timed out. (connect timeout=3.05)'))
: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/

这里写图片描述

在删除前再学习一个命令,查看通道

conda config –show

add_anaconda_token: True
add_pip_as_python_dependency: True
allow_softlinks: True
always_copy: False
always_yes: False
auto_update_conda: True
binstar_upload: None
changeps1: True
channel_alias: https://conda.anaconda.or
channel_priority: True
channels:
  - conda-forge
  - https://mirrors.tuna.tsinghua.edu.cn
  - defaults
client_cert:
client_cert_key:
create_default_packages: []
debug: False
default_channels:
  - https://repo.continuum.io/pkgs/free
  - https://repo.continuum.io/pkgs/pro
  - https://repo.continuum.io/pkgs/msys2
disallow: []
json: False
offline: False
proxy_servers: {}
quiet: False
shortcuts: True
show_channel_urls: True
ssl_verify: True
track_features: []
update_dependencies: True
use_pip: True
verbosity: 0

我们用删除的命令把这个镜像个删除了,注意要把引号给去掉。

conda config –remove channels ‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
这里写图片描述

再来看show,里面已经没有清华源了。

conda config –show

(D:\Program Files\Anaconda2) C:\Users\Administrator>conda config --show
add_anaconda_token: True
add_pip_as_python_dependency: True
allow_softlinks: True
always_copy: False
always_yes: False
auto_update_conda: True
binstar_upload: None
changeps1: True
channel_alias: https://conda.anaconda.org/
channel_priority: True
channels:
  - conda-forge
  - defaults
client_cert:
client_cert_key:
create_default_packages: []
debug: False
default_channels:
  - https://repo.continuum.io/pkgs/free
  - https://repo.continuum.io/pkgs/pro
  - https://repo.continuum.io/pkgs/msys2
disallow: []
json: False
offline: False
proxy_servers: {}
quiet: False
shortcuts: True
show_channel_urls: True
ssl_verify: True
track_features: []
update_dependencies: True
use_pip: True
verbosity: 0
  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值