How to install pytorch in Anaconda with conda or pip?

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

Leave a Comment