在Pytorch的官网上下载pytorch的时候速度十分的慢,解决的方法为:将下载源更换为清华源
转载自:https://blog.csdn.net/watermelon1123/article/details/88122020
1. 首先打开anaconda的power shell,然后添加下载清华的下载源
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 --set show_channel_urls yes
同时添加第三方的下载源(强烈建议添加,否则有可能在清华源找不到这个库)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
2、到Pytorch官网上选择相应的安装版本版本
主要是平台、cpu、安装方式的选择,得到安装的命令
3、复制上面这条命令,注意:将命令最后面的 -c Pytorch 去掉
这样就可以从清华源上下载
经过测试,这个方法是可以使用的