pytorch.cuda安装

type
status
date
slug
summary
tags
category
icon
password
安装cuda,根据官网
配置PyTorch PyTorch官方文档:https://pytorch.org/docs/stable/index.html# (要梯子) PyTorch中文文档:https://pytorch.apachecn.org/ (有广告) 1-anaconda下载地址:https://www.anaconda.com/download/success 2-检查conda是否可用:conda --version 或者 conda -V 3-创建pytorch使用的虚拟环境:conda create -n torch2 python=3.11 4-查看创建的虚拟环境:conda env list 初始化conda 需要终端管理员权限:conda init cmd.exe 5-激活虚拟环境:conda activate torch2 6-在虚拟环境中输入:nvidia-smi 7-进入pytorch官网获取安装指令:https://pytorch.org/ 8-输入复制过来的指令:pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118(每个人不一定都一样) 9-检查pytorch是否安装成功: import torch torch.cuda.is_available() 10-将虚拟环境添加jupyter内核中:python -m ipykernel install --user --name=torch2 如果报错显示没有ipykernel模块,请安装:pip install jupyter –i https://pypi.tuna.tsinghua.edu.cn/simple PS:如果你需要先安装cuda,再安装pytorch,请参考:【保姆级教程】最详细的anaconda+pytorch安装教程!看完就能入门深度学习!anaconda环境配置与使用/深度学习/计算机视觉anaconda下载
 
 
SCI写作流程+模板
Loading...
Catalog