how to configure Python, opencv and numpy

Discussion in 'Programmer's Corner' started by ep.hobbyiest, Aug 29, 2015.

  1. ep.hobbyiest

    Thread Starter Member

    Aug 26, 2014
    91
    0
    Hi,

    I got stuck while starting up with python.
    i installed python version 2.7, opencv version 3.0 and numpy version 1.7.1.

    i start one simple program to show image as follows

    Code (Text):
    1.  
    2. ########################################
    3. ## Import of the image
    4.  
    5. #import numpy
    6. import cv2
    7. ########################################
    8.  
    9. ########################################
    10. ## read image
    11. img = cv2.imread('test.jpg')
    12.  
    13. ########################################
    14.  
    15.  
    16. ########################################
    17. ## imshow
    18.  
    19. cv2.imshow('image',img)
    20. ########################################
    21.  
    22. ########################################
    23. ## close and exit
    24.  
    25. cv2.waitKey(0)
    26. cv2.destroyAllWindows()
    27. ########################################
    28.  
    after start to run he gives me error as

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

    Traceback (most recent call last):
    File "E:\python\imshow.py", line 5, in <module>
    import cv2
    ImportError: numpy.core.multiarray failed to import
     
  2. ep.hobbyiest

    Thread Starter Member

    Aug 26, 2014
    91
    0
    Hi anybody know how to correctly configure it.
     
Loading...