最近清华源不太好使了,所以推荐中科大镜像源,如下步骤:
1.还原原始通道
conda config --remove-key channels
2.添加中科大源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
注:倒数第二行对于安装Pytorch 要,安装命令如下:
官方格式:
conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.1 -c pytorch
改完源后的格式(去掉了-c 不然下载还是很慢):
conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.1 pytorch
3. 验证通道是否更改
使用以下命令
conda info
结果:证明已经更改好了