在用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/
在执行pytorch官网的安装命令语句就可以了
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch或者
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113