天天看點

Linux上安裝指定版本的torch

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

Linux上安裝指定版本的torch

如果下載下傳太慢,可以根據上圖中的url使用第三方工具下載下傳。如果要下載下傳版本1.0.1的直接修改指令中的torch==1.0.1即可

下載下傳完成之後pip3 install torch-0.4.1-cp35-cp35m-manylinux1_x86_64.whl安裝即可

Linux上安裝指定版本的torch

繼續閱讀