当前位置:网站首页>[reprint] solve the problem that CONDA installs pytorch too slowly

[reprint] solve the problem that CONDA installs pytorch too slowly

2022-07-08 00:53:00 UQI-LIUWJ

In the use of conda Yes pytorch When installing , Because the download of the original image is too slow , Even termination , The following solutions can be adopted
1. Add Tsinghua garden image :
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/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( This command means from channel Displays when installing packages in channel Of url, In this way, you can know the installation source of the package )
2. Start installation pytorch, The default is already in pytorch The official website has got the order that meets your installation requirements , for example :
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
 Be careful : To install using the added image source , You need to put the last of the command -c pytorch Get rid of ;( Because this means downloading from the original image )
3. therefore , Direct execution :
conda install pytorch torchvision torchaudio cudatoolkit=10.2
4. Wait for the installation to complete !
原网站

版权声明
本文为[UQI-LIUWJ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/189/202207072202568230.html