打开链接:https://blog.csdn.net/wangkaiT1234/article/details/125878595?spm=1001.2014.3001.5501
安装pytorch打开网址:https://pytorch.org/get-started/locally/
命令执行:conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
进入python,输入import torch