1.安装pip和pip3
sudo apt-get install python-setuptools python-dev build-essential sudo easy_install pip sudo apt-get install python3-pip
2.安装torch
pip3 install torch==0.4.1 -f https://download.pytorch.org/whl/cpu/stable
如果下载太慢,可以根据上图中的url使用第三方工具下载。如果要下载版本1.0.1的直接修改指令中的torch==1.0.1即可
下载完成之后pip3 install torch-0.4.1-cp35-cp35m-manylinux1_x86_64.whl安装即可