首页 > 系统相关 >10分钟安装好torch的GPU版本(Windows)

10分钟安装好torch的GPU版本(Windows)

时间:2024-06-30 19:26:55浏览次数:3  
标签:10 cu118 Windows torch cp38 cuda 版本 下载

pytorch-gpu

1. 确定cuda版本

nvcc -V

在这里插入图片描述

版本为11.8 , 一会下载的版本为cu118

2. 确定Python版本

在这里插入图片描述

确定python版本为为3.8,一会下载为cp38

3 开始下载-cu118-cp38

https://download.pytorch.org/whl/torch_stable.html

(我测试了几个版本,发现只要保证cu118, cp38就可以。至于中间的torch版本,torchvision版本。什么版本都可以,因此你只要对应上cuda和python的版本就行)

3.1 下载cuda

在这里插入图片描述

3.2 下载torchvision

在这里插入图片描述

4.下载好了

在这里插入图片描述

5.开始安装

pip install “torch-2.0.0+cu118-cp38-cp38-win_amd64.whl”

在这里插入图片描述

pip install “torchvision-0.15.0+cu118-cp38-cp38-win_amd64.whl”

在这里插入图片描述

6. 开始验证

python

import torch

print(torch.cuda.is_available())

在这里插入图片描述
显示True,表示安装成功!!

标签:10,cu118,Windows,torch,cp38,cuda,版本,下载
From: https://blog.csdn.net/qlkaicx/article/details/139937270

相关文章