Ask Your Question
0

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

asked 2014-01-08 09:09:17 -0600

Constantin gravatar image

Hi

I just installed the opencv. When I try to import the cv2 I get this error:

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

Then I check the latest release of the numpy and it was 1.7. I installed this version, but the problem yet exist! how can I fix it.

I using python 2.7 on the Window 7(Ultimate)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2014-01-10 15:26:55 -0600

Install numpy version 1.8.0 for win32, restart python and then import cv2. This should resolve your problem.

edit flag offensive delete link more

Comments

Thanks, I did it but it didn't work :)

Constantin gravatar imageConstantin ( 2014-01-15 04:25:08 -0600 )edit

It worked for me, thanks for the advice.

Rivalcoba gravatar imageRivalcoba ( 2014-01-23 16:45:27 -0600 )edit
0

answered 2014-01-15 04:23:06 -0600

Constantin gravatar image

The problem solved!

I just compile opencv from source with cmake. and then the problem vanished!

edit flag offensive delete link more

Comments

this is the solution and I coulden't accept it as a solution!

Constantin gravatar imageConstantin ( 2014-01-15 04:24:33 -0600 )edit
0

answered 2016-01-06 01:12:46 -0600

sow gravatar image

i also got same error, how to compile opencv from sources with cmake?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-08 09:09:17 -0600

Seen: 7,101 times

Last updated: Jan 15 '14