1 查看cuda版本
一定要退出已安装的环境,到base下查看版本!
nvcc -V
2 去pytorch官网选择对应版本下载
2.1 找到以前的版本
2.2 直接搜对应的版本
2.3 找到对应命令
3 安装完验证
python3
import torch
print(torch.cuda.is_available())
print(torch.cuda.get_device_name(0))
4 卸载环境
conda uninstall pttorch
或
pip uninstall libtorch