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 -0500

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 -0500

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 -0500 )edit

It worked for me, thanks for the advice.

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

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

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 -0500 )edit
0

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

sow gravatar image

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

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

Seen: 6,615 times

Last updated: Jan 15 '14