Python安装CUDA

官方安装指南:

https://pytorch.org/get-started/locally/

强制重装:

pip install  --force-reinstall torch --index-url https://download.pytorch.org/whl/cu128

pip install -r requirements.txt --extra-index-url=https://download.pytorch.org/whl/cu118

其它镜像源:

https://mirror.sjtu.edu.cn/pytorch-wheels

# 2.3.0+cu118
pip install torch==2.3.0+cu118 torchvision==0.18.0+cu118 torchaudio==2.3.0+cu118 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
# 2.3.0+cu121
pip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 torchaudio==2.3.0+cu121 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

# 2.2.0+cu118
pip install torch==2.2.0+cu118 torchvision==0.17.0+cu118 torchaudio==2.2.0+cu118 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
# 2.2.0+cu121
pip install torch==2.2.0+cu121 torchvision==0.17.0+cu121 torchaudio==2.2.0+cu121 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

# 2.1.0+cu118
pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0+cu118 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
# 2.1.0+cu121
pip install torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0+cu121 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

# 2.0.0+cu118
pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1+cu118 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享