Linux直接命令行:
pip install torch1.9.0+cu111 torchvision0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
关于环境:
python版本是3.7,
nvcc -V
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
virtual packages :
__cuda=11.6=0
__linux=4.15.0=0
__glibc=2.27=0
__unix=0=0
__archspec=1=x86_64
参考网址:https://pytorch.org/get-started/previous-versions/