在conda install pytorch torchvision cudatoolkit=x.x 版本时,下载几百兆的安装文件总是卡着不走,最后出现read timed out 而结束安装
原因是:
解决办法:
更新镜像源:
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/pytorch/
命令行中依次执行以上语句即可。亲测可用。
最后执行pytorch安装指令:
#(x.x 版本号)
conda install pytorch torchvision cudatoolkit=x.x
希望能帮到你。
2020.04.03 记录。