Pytroch本地安装方法

张开发
2026/5/5 3:42:28 15 分钟阅读

分享文章

Pytroch本地安装方法
Nvidia 50系列显卡需要cuda 12。8及其以上的版本不然会报错的1 查看电脑安装的cuda版本nvidia-smi这里的红圈标注的是cuda 最高版本虚拟环境中安装只要不超过12.0就可以第二步 去官网看torch, torchvision等版本的匹配关系https://pytorch.org/get-started/previous-versions/比如这里第三步 手到下载然后本地安装https://download.pytorch.org/whl/torch_stable.html从终端安装,如何修改镜像源举例pip3installtorch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126如何采用上面这个安装命令下载源是来源于官方网站下载速度会很慢。提速方法是改成下面的命令pip3installtorch torchvision torchaudio --index-url https://mirrors.nju.edu.cn/pytorch/whl/cu126

更多文章