在CentOS上安装PyTorch,可通过pip或conda方式,安装包下载地址及命令如下:
pip3 install torch torchvision torchaudio
,安装包会从PyTorch官方默认源下载。pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
,可从PyTorch官网获取最新安装命令及对应版本下载链接。conda install pytorch torchvision torchaudio cpuonly -c pytorch
,安装包从PyTorch的conda官方频道下载。conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
,同样从PyTorch的conda官方频道获取包。