Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numpy.core.multiarray doesn't work anymore after opencv installation

I am using python 2.7 on anaconda notebook on mac. Numpy was working perfectly along with tensorflow until I tried to install OpenCV using (pip install OpenCV). It now produces an error as shown

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7
Traceback (most recent call last):
ImportError: numpy.core.multiarray failed to import

I have tried all the ways to install numpy, but I keep getting this message:

Requirement already satisfied: numpy in ./anaconda/lib/python2.7/site-packages

I even tried to reinstall it and install it again, but still, the same message shows up.

like image 527
engalsh Avatar asked Feb 05 '26 16:02

engalsh


1 Answers

Try to upgrade numpy

pip install numpy --upgrade

Then check your path:

import numpy
print numpy.__path__

Maybe you need to move some files, look this question.

like image 164
RaminNietzsche Avatar answered Feb 07 '26 05:02

RaminNietzsche