0

I have install cmake version 2.8.12 and downloaded opencv-2.4.6.1

I then cd into the opencv-2.4.6.1 directory and run

$ cmake CMakeLists.txt 
$ make
$ sudo make install

Yet I cannot import cv2 in python. CMake, make, and make install run fine, what gives?

I am running Mountain Lion with xCode developer tools installed and python 2.7.2

3
  • 1
    Not sure about OSX, but on windows you need to copy python module from build directory to Python's site-packages Commented Oct 13, 2013 at 3:11
  • That worked after compiling it in 32 bit mode. Thanks. Commented Oct 13, 2013 at 6:02
  • @Igonato: Provide your comment as answer so that questionnaire can accept it and close the session. Commented Oct 13, 2013 at 11:29

1 Answer 1

1

You need to copy compiled module from the build/python/2.X to the /Library/Python/2.X/site-packages/ folder.

Also OpenCV needs to be compiled with same bitness as python.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.