Ubuntu利用conda安装pytorch,使用
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
但是试了好几次,都是开在几个下载慢的地方,出现HTTP error导致停止下载,后来使用以下语句解决问题
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/bioconda/
conda config --set show_channel_urls yes
这里我们不能将网页上每个镜像源加入,会导致速度变慢
conda config --remove channels defaults
之后加入这句删除default后,就可以安心下载了!速度翻倍!