anaconda安装指定版本的pytorch

首先卸载原有torch

pip uninstall torch

安装新的torch版本

pip install torch==1.6.0 #这样Didn't work!!!

1.先在PyTorch官网查到自己电脑对应的torch版本
网址: https://pytorch.org/get-started/previous-versions/

2.选择合适的版本

复制代码在虚拟环境中
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

参考:

手把手带你安装PyTorch指定版本嘿!

posted @ 2023-07-25 09:20  梅雨明夏  阅读(580)  评论(0编辑  收藏  举报