The following worked for me. First install MKL:
conda install -c anaconda mkl
After this, install pytorch and torchvision:
conda install -c pytorch pytorch torchvision
Go to the official PyTorch.org and follow the steps accordingly.
Select your preferences and you will see an appropriate command below on the page.
If you don’t have GPU in the system, set CUDA as None or CPU
Example command:
conda install pytorch-cpu torchvision-cpu -c pytorch