Unable to install OpenCV on Elementary OS Freya

asked 2015-12-23 10:49:20 -0600

chr0x gravatar image

updated 2015-12-23 10:59:38 -0600

Hi.

I'm trying to install Opencv 3.0.0 on Elementary OS (Freya) but the installation is not generating the python module ("cv2.so" file). I already had installed OpenCV 3 before on Windows, OSX and Ubuntu 14.04 with no errors, so I think maybe the problem is related with Elementary OS...

I'm following this tutorial. I downloaded Opencv and Opencv-contrib and I'm making the build with this command:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D BUILD_EXAMPLES=ON -D PYTHON_EXECUTABLE=/usr/bin/python2.7/ -D PYTHON_INCLUDE=/usr/include/python2.7/ -D PYTHON_LIBRARY=/usr/lib/libpython2.7.a -D PYTHON_PACKAGES_PATH=/usr/local/lib/python2.7/site-packages/ -D PYTHON_NUMPY_INCLUDE_DIR=/usr/local/lib/python2.7/dist-packages/numpy/core/include ..

(I made some additions trying to fix the problem, probably various of these commands are unnecessary...)

The problem is that I'm getting this scenario:

--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
--     Libraries:                   /usr/lib/libpython2.7.a (ver 2.7.6)
--     numpy:                       /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.10.2)
--     packages path:               lib/python2.7/dist-packages
-- 
--   Python 3:
--     Interpreter:                 /usr/bin/python3.4 (ver 3.4.3)

Package path is being set to dist-packages instead of site-packages (I know it's not the problem at all... but as I manually tried to set this path to site-packages it looks weird that it is on dist-packages).

Also... no one cv2.so are being generated during the make && make install commands (I tried "find / -name cv2.so with no results)

So... any suggestions how can I fix this problem and get the python module of opencv working on my Elementary OS?

edit retag flag offensive close merge delete

Comments

please, replace the screenshot of the cmake output with a text version

berak gravatar imageberak ( 2015-12-23 10:55:12 -0600 )edit

done! as requested...

chr0x gravatar imagechr0x ( 2015-12-23 11:00:22 -0600 )edit