Reputation: 213
I am very first time using pyTorch. I am trying to install it. In how many ways I can do this? Please provide the steps for that.
Upvotes: 1
Views: 1301
Reputation: 862
You can install PyTorch in 3 ways.
pip
conda
1.Intel Optimized Pytorch Installation
Install the stable version (v 1.0) on Linux via Pip for Python 3.6.
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip install torchvision
2.Conda Pytorch Installation
conda install pytorch-cpu torchvision-cpu -c pytorch
3.PyTorch Installation from source
conda create -n <env_name> python=3.6
export CMAKE_PREFIX_PATH=/home/user/.conda/envs/<env_name>
source activate <env_name>
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
conda install -c conda-forge opencv
conda install Pillow
git clone --recursive https://github.com/intel/pytorch
cd pytorch
mv caffe2/contrib/cuda-convnet2/ /tmp
# Fix the bug removing the old package out
python setup.py install 2>&1 | tee build.out
Hope this will help you.
Upvotes: 6