anaconda环境变量下安装第三方库失败情况

发布时间 2023-03-23 16:28:19作者: 权世界

anaconda环境变量下安装第三方库失败情况

1. UnavailableInvalidChannel: The channel is not accessible or is invalid.
channel name: anaconda/pkgs/free
channel url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
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.

解决办法:换回默认源,继续使用conda,操作如下:
onda config --remove-key channels
或:解决方法:在conda里一行行键入以下命令即可:

conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://repo.continuum.io/pkgs/free/ 
conda config --add channels https://repo.continuum.io/pkgs/main/ 
conda config --set show_channel_urls yes
或:c盘-用户-user名字-搜索.con-.condarc -直接删除里面的清华镜像