解決Annaconda安裝pytorch網速過慢的問題

更改源

刪除不能用的源,並添加清華源

conda config --remove-key channels

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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

conda config --set show_channel_urls yes

執行安裝命令

GPU版本

conda install pytorch torchvision cudatoolkit=10.2

CPU版本:conda install pytorch torchvision cpuonly

默認安裝最新版本,可參考官網指定其他版本,如conda install pytorch=1.2.0

注:不要學官網在-c 後加 "pytorch",這是在使用官方通道。

錯誤寫法:conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

 

如有疑問請在評論區留言,如有幫助麻煩右上角點個贊~0~蟹蟹

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章