一.ubuntu22.04安装cuda11.8+python3.12+pytorch2.6.0
参照博客: ubuntu16.04安装cuda8.0+python3.6+pytorch1.0.0
1.使用CONDA创建新python环境
conda create -n torch python=3.12
// 如果有问题,删除: conda remove -n torch --all
2.安装pytorch2.6.0和cuda11.8, 安装命令参照https://pytorch.org/get-started/previous-versions/
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118
3.测试是否安装成功

浙公网安备 33010602011771号