欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

UnavailableInvalidChannel: The channel is not accessible or is invalid.

程序员文章站 2022-06-22 17:05:37
...

UnavailableInvalidChannel: The channel is not accessible or is invalid.

1. UnavailableInvalidChannel: The channel is not accessible or is invalid.

(base) [email protected]:~$ conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0
Collecting package metadata (current_repodata.json): failed

UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: anaconda/cloud
  channel url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  error code: 404

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.


(base) [email protected]:~$


(base) [email protected]:~$ conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
Collecting package metadata (current_repodata.json): failed

UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: anaconda/cloud
  channel url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  error code: 404

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.


(base) [email protected]:~$

2. 删除 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

(base) [email protected]:~$ cat ~/.condarc
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true
(base) [email protected]:~$
(base) [email protected]:~$ sudo vim ~/.condarc
[sudo] yongqiang 的密码:
(base) [email protected]:~$
(base) [email protected]:~$ cat ~/.condarc
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true
(base) [email protected]:~$