1

I have a problem with building PyTorch from source. I use Anaconda Python 3.6. I installed all the dependencies using conda and issued "python setup.py install" command to build it. It builds all files successfully but then it fails" at line 286 of caffe2/contrib/cuda-convnet2"

Pls help! Thank you!

Sarah Jane
  • 11
  • 4

1 Answers1

0

Installation with python 3.7 worked for me. Try out the below steps

   conda create -n <env_name> python=3.7

   export CMAKE_PREFIX_PATH=/home/user/.conda/envs/<env_name> #change the path to yours

   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

Then try importing pytorch

cd ~
python
import torch

Hope this helps.