天天看點

ubuntu安裝pytorch以及torchnet

http://pytorch.org/
           
轉自http://blog.csdn.net/amds123/article/details/69396953
           
conda

cuda7.5 
conda install pytorch torchvision -c soumith

cuda8.0 
conda install pytorch torchvision cuda80 -c soumith


pip

cuda7.5

python2.7
pip install http://download.pytorch.org/whl/cu75/torch-0.1.11.post5-cp27-none-linux_x86_64.whl 
pip install torchvision 

python3.5
pip install http://download.pytorch.org/whl/cu75/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl 
pip install torchvision

           
python3.6
           

pip install http://download.pytorch.org/whl/cu75/torch-0.1.11.post5-cp36-cp36m-linux_x86_64.whl

pip install torchvision

cuda8.0

python2.7

pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp27-none-linux_x86_64.whl

pip install torchvision

python3.5

pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl

pip install torchvision

python3.6

pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp36-cp36m-linux_x86_64.whl

pip install torchvision

安裝torchnet 參考https://github.com/pytorch/tnt

上面一系列裝好之後,發現在python中還是沒辦法import torchnet

首先得Make sure you have PyTorch installed, then do:

pip install git+https://github.com/pytorch/[email protected]
           

應該ok了,至于torch,我一直很奇怪,和pytorch還是有點差別的

pip install --upgrade git+https://github.com/pytorch/[email protected]
           

安裝Pytorch的最好方式就是去官網檢視

https://pytorch.org/