- 问题如标题。
原因:使用pip install pytorch
,这种安装方式包含CUDA工具库
方案:上pytorch官网,选择合适的CUDA版本进行安装
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
pip install pytorch
,这种安装方式包含CUDA工具库pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117