linux 中conda 更换国内源
001、
(base) root@ubuntu01pc1:~# conda --version ## conda版本 conda 4.12.0
002、在终端执行如何命令
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/
conda config --set show_channel_urls yes
003、查看当前源
(base) root@ubuntu01pc1:~# conda config --show channels channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - defaults
004、若移除源,执行:
conda config --remove-key channels
参考:https://www.jianshu.com/p/d48981c3f423