一、問題
conda安裝包報錯
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.
二、原因
讀者手動更新過python的源為國內安裝源,pip可以正常使用,但是國內源停止了Anaconda鏡像,不支持conda安裝與更新。
三、解決
- 使用pip安裝或更新package
- 換回默認源,繼續使用conda,操作如下
conda config --remove-key channels