Ask Your Question

PierreBdR's profile - activity

2019-04-12 12:11:52 -0600 received badge  Famous Question (source)
2017-10-13 02:33:18 -0600 received badge  Notable Question (source)
2017-04-19 06:59:00 -0600 received badge  Popular Question (source)
2014-12-04 10:55:57 -0600 asked a question Compile Python3 lib of OpenCV3.0

I am trying to compile the Python3 module for OpenCV using the latest version on git (Note: I also tried with the beta version and the problem is the same). Everything is done under Linux using Ubuntu 14.04.

It seems that, although CMake finds Python3, it gets ignored. More specifically, in the version_string file, I can see:

Python 2:
   Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
   Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6)
   numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)
   packages path:               lib/python2.7/dist-packages
Python 3:
   Interpreter:                 /usr/bin/python3.4 (ver 3.4)
   Libraries:                   NO
   numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.8.2)
   packages path:               lib/python3.4/dist-packages

Although in CMakeCache.txt I have:

//Path to Python interpretor
PYTHON3_EXECUTABLE:FILEPATH=/usr/bin/python3.4

//Python include dir
PYTHON3_INCLUDE_DIR:PATH=/usr/include/python3.4m

//Python include dir 2
PYTHON3_INCLUDE_DIR2:PATH=/usr/include/x86_64-linux-gnu/python3.4m

//Path to Python library
PYTHON3_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.4m.so

//Path to Python debug
PYTHON3_LIBRARY_DEBUG:FILEPATH=

//Path to numpy headers
PYTHON3_NUMPY_INCLUDE_DIRS:PATH=/usr/lib/python3/dist-packages/numpy/core/include

//Where to install the python packages.
PYTHON3_PACKAGES_PATH:PATH=lib/python3.4/dist-packages

Any idea what may be hapenning?