python -m pip install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

可以修改==后面的内容,例如指定torch版本为: torch==1.12.0+cu113,cuda版本也类似

测试

cuda: 11.4
cudnn: 8.2
torch:1.12
tensorRT: 8.2.4.2
python: 3.9

更多推荐