I’ve spent a whole weekend trying to compile the new OpenCV 3 version on my Xubuntu 14.04 Thrusty Tahr machine for use also with Python. I was very intrigued by the behavior described here and then I decided to start a fresh new Linux installation to understand better what was happening.
The main symptom was, with all the dev packages of Python installed (check them before you read this post -> libpython2.7-dev or libpython3.4-dev), the CMake configuration output shows the message:
Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7") Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (found suitable exact version "2.7.6") Found PythonInterp: /usr/bin/python3.4 (found suitable version "3.4", minimum required is "3.4") Could NOT find PythonLibs (missing: PYTHON_LIBRARIES) (Required is exact version "3.4.0")
The current version of CMake available on the Ubuntu repositories is 2.8. However, some posts inspired me to upgrade CMake.
I’ve decided to add the following PPA to my set of repositories:
The version of CMake at the PPA today is 3.2.
And (finally!!!) the problem was solved, and the compilation ran smoothly…