Install PyTorch, Caffe2 and Onnx in Ubuntu and MacOS
$ conda create -n < YOURENVNAME> python=3.6 llvm llvmdev && source activate < YOURENVNAME>
$ pip install wmd
$ conda create -n < YOURENVNAME> python=3.6 clangxx_osx-64 clang_osx-64 && source activate < YOURENVNAME>
$ pip install wmd
Install basic dependencies
$ export CMAKE_PREFIX_PATH=" $( dirname $( which conda) ) /../" # [anaconda root directory]
Install basic dependencies
$ conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
$ conda install -c mingfeima mkldnn
$ conda install -c anaconda cython
Add LAPACK support for the GPU
$ conda install -c pytorch magma-cuda92 # or [magma-cuda80 | magma-cuda91] depending on your cuda version
$ export CMAKE_PREFIX_PATH=[anaconda root directory]
$ conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
$ conda install -c anaconda cython
$ git clone --recursive https://github.com/pytorch/pytorch
$ cd pytorch
Back to Previous Version of PyTorch (v0.4.0)
$ git checkout v0.4.0
$ git submodule update --init
$ FULL_CAFFE2=1 python setup.py install
$ pip install torchvision
$ pip install future
$ MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ FULL_CAFFE2=1 python setup.py install
$ pip install torchvision
$ pip install future
$ PROTOBUF_INCDIR=/path/to/anaconda/envs/caffe2 pip install third_party/onnx
Install PyTorch 0.4.0 by pip
$ pip install /path/to/whl/file