Cannot import torch on jupyter notebook

This is most probably because you are using a CUDA variant of PyTorch on a system that doesn’t have GPU driver installed. That is to say, if you don’t have a Nvidia GPU card, please install the cpu-only package according to the commands on https://pytorch.org.

# Conda
conda install pytorch torchvision cpuonly -c pytorch
# Pip
pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
3 Likes