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.