Solution to ImportError: numpy.core.multiarray failed to import

If you’re getting the error ImportError: numpy.core.multiarray failed to import, that seems to be an issue with the latest version of numpy (1.19). Installing the previous version 1.18 worked for me.

If you’re getting the same error on Windows try running:

!pip install numpy==1.18.5 torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

instead of

!pip install numpy torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
1 Like