Torch not compiled with CUDA enabled 解决办法

## 目标

解决Torch not compiled with CUDA enabled 版本不兼容问题

### 原理
Torch not compiled with CUDA enabled,即CUDA、torch的版本兼容问题是造成print(torch.cuda.is_available()) 返回false的一种原因。本文搜集从卸载CUDA、torch,选择兼容版本,再到使用清华源,最后安装CUDA、torch的博客集合,作为解决方法:
如何查看torch版本:https://blog.csdn.net/weixin_47414034/article/details/124632748
如何查看cuda版本:https://blog.csdn.net/weixin_38723958/article/details/123143521

卸载torch:https://blog.csdn.net/zaf0516/article/details/103927989
卸载CUDA:https://blog.csdn.net/Zinnir/article/details/122766367

安装 PyTorch 切换清华源镜像:https://blog.csdn.net/weixin_44589540/article/details/122847278
CUDA历史版本下载:https://developer.nvidia.com/cuda-toolkit-archive
PYTORCH历史版本下载:https://pytorch.org/get-started/previous-versions/
PYTORCH版本建议按照网页上的CUDA版本匹配下载对应的版本
conda 多环境切换:https://blog.csdn.net/yuehenmiss/article/details/102914941

感谢以上博文的作者

来源:lznext

物联沃分享整理
物联沃-IOTWORD物联网 » Torch not compiled with CUDA enabled 解决办法

发表评论