方法一 (清华源)
网上最普遍的方法是添加清华的镜像下载
(不写了,网上一找一大堆)
参考博客 :https://blog.csdn.net/weixin_44321080/article/details/105974171
方法二 (中科院源)
如果添加清华镜像失败的情况下,可以考虑使用中科院的镜像:
==================== 插个题外话==========================
我在使用conda config --add channels xxx
的时候会报错
MultipleKeyError:Multiple aliased keys in file xxx/.condarc:
- channel
- channelsMust declare only one. Prefer '_channels'
该问题的解决方法:
- 使用
conda config --remove channels xxx
(把add 换成remove) - 如果上面那条语句没有解决问题,那么就使用
conda config --remove-key channels
。
(该方法有风险,需谨慎,我是这么成功的,但是并不清楚是什么原理。。。)
如果 conda config --show 可以正常显示的话就是没问题的
========================================================
使用中科院的镜像,可以 用 conda config --add channels https://mirrors.ustc.edu.cn/ananconda/pkgs/main/
如果遇到了.condarc文件不可以随便加镜像的时候,使用
conda install cudatoolkit=9.0 -c https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
这样可以保证.condarc文件不被破坏,但是需要每次手动打镜像