使用清华源安装pytorch的方法(自己实验成功)

在用pytorch的官方命令安装的时候

conda install pytorch torchvision torchaudio cpuonly -c pytorch

因为服务器在海外,速度很慢,还经常报错。可以和安装其他软件一样,换成清华镜像源。

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/

关键的一步来了:在官网的命令上去去除:-c pytorch

conda install pytorch torchvision torchaudio cpuonly

安装成功。

你可能感兴趣的:(anaconda,python,tornado,pytorch)