Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing opencv and getting numpy.core.multiarray failed to import

Trying to install OpenCV and running into an issue where attempting to import cv2 results in this output -

    RuntimeError: module compiled against API version 9 but this version of numpy is 7

Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import cv2
ImportError: numpy.core.multiarray failed to import

I'm running on Windows 7 x64, Python v 2.7.9 Thanks!

like image 980
NoTrueScotsman Avatar asked Jan 26 '15 20:01

NoTrueScotsman


1 Answers

The error is telling you that you have an out of date version of numpy. If you used pip to install things you can simply run pip install numpy -U, or download the appropriate version from their website.

like image 63
chris Avatar answered Sep 20 '22 20:09

chris