太实用了!Pytorch快速安装【清华源】 方法,最优国内镜像选择,妥妥的!

官网下载Pytorch

速度超慢。。。。
还会崩溃。。。。
执行如下命令安装Pytorch

conda install pytorch torchvision torchaudio cpuonly -c pytorch

只有cpu版本的,没啥用

如何解决???:
使用清华源命令进行安装即可,完美解决安装速度慢和安装失败的问题:

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

这几句,可以把改为清华源
但是,需要修改一下.condarc文件

第三行是pytorch的清华源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/

只需要这三行!!!
只需要这三行!!!
只需要这三行!!!
重要的事情说三遍!!!!!!!!!!!!!!!!!!!
然后,在pytorch的官网的老版本那里,找安装命令!!
记得是老版本!!!!
cudatookit的版本nvidia-smi查一下
找个合适的

安装命令:

conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3

记得去掉 -c pytorch

failed to run cuBLAS routine: CUBLAS_STATUS_EXECUTION_FAILED

物联沃分享整理
物联沃-IOTWORD物联网 » 太实用了!Pytorch快速安装【清华源】 方法,最优国内镜像选择,妥妥的!

发表评论