之前安装过pytorch,但是显示cuda不可用,一气之下卸载了pytorch,结果就是一直报错。
显示的错误: ERROR: Exception: Traceback (most recent call last): File "D:\Anacoda\lib\si.........后面吧啦吧啦一堆。
最终解决的方法再下面做个记录。
安装清华源,(都能搜到怎么操作)
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
进入pytorch官网,选择合适的版本。
官网链接在这:PyTorch

复制上面的下载命令。
接着打开anaconda powershell prompt

本文分享了作者遇到PyTorch CUDA不可用的问题及解决过程。通过安装清华源并从PyTorch官网选择合适的版本安装,最终成功解决了CUDA不可用的问题。
4709

被折叠的 条评论
为什么被折叠?



