What does the following error mean, when I tried to import torch library on iPython?


RuntimeError                              Traceback (most recent call last)

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

ImportError                               Traceback (most recent call last)
 in ()
----> 1 import torch

~/anaconda3/lib/python3.6/site-packages/torch/init.py in ()
     51 sys.setdlopenflags(_dl_flags.RTLD_GLOBAL | _dl_flags.RTLD_NOW)
     52 
---> 53 from torch._C import *
     54 
     55 all += [name for name in dir(_C)

ImportError: numpy.core.multiarray failed to import

You may need to update your numpy installation.

Run this in terminal:

pip install -U numpy

If this doesn't work, try uninstalling and then reinstalling it:

pip uninstall numpy
pip install numpy

