问题描述

使用anaconda创建新环境,执行 conda create -n finetune python=3.8这条命令时,出现如下错误:


Platform: win-64
Collecting package metadata (repodata.json): failed

UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel defaults 
- https://mirrors.aliyun.com/anaconda/pkgs/free/ 
- https://mirrors.aliyun.com/anaconda/pkgs/main/ 
- https://pypi.doubanio.com/simple/ 
- https://mirrors.aliyun.com/anaconda/pkgs/r/ 
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main <https://conda.anaconda.org/defaults - https://mirrors.aliyun.com/anaconda/pkgs/free/ - https://mirrors.aliyun.com/anaconda/pkgs/main/ - https://pypi.doubanio.com/simple/ - https://mirrors.aliyun.com/anaconda/pkgs/r/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main>

The channel is not accessible or is invalid.

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.

例如去浏览器访问一下https://mirrors.aliyun.com/anaconda/pkgs/free/网址,发现已经无法访问

问题解释

镜像源不可用,需要清除现有源配置。使用的源有问题,恢复默认源就可以了

解决问题

删除所有的源配置,恢复到 conda 的默认源

conda config --remove-key channels

再次执行 conda create -n finetune python=3.8这条命令,就可以正常创建环境了,使用的源是官方默认的源:

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐