运行报错
RuntimeError: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback): No module named 'torch.utils.checkpoint'
需要重新安装torch gpu版本
深度学习torch+cuda+torchvison+torchaudio版本匹配
官网版本:https://pytorch.org/get-started/previous-versions/
还是在官网找好,再安装下载,否则,费时费力。
torch-2.1.0+cu121-cp38-cp38-win_amd64.whl+torchvision0.16.0+torchaudio=2.1.0
torch-1.8.0+cu111-cp38-cp38-win_amd64.whl+torchvision0.9.0 +torchaudio=0.8.0
———————————————
然后处理
使用以下命令安装:
torch
pip install torch==2.1.0+cu121 --index-url https://download.pytorch.org/whl/cu121
pip install torch==2.1.0+cu121 --index-url https://download.pytorch.org/whl/cu121
Shortcuts for Next Step:
接下来安装 torchvision
:
plaintext
Copy
pip install torchvision==0.16.0
最后安装 torchaudio
:
plaintext
Copy
pip install torchaudio==2.1.0