Reputation: 1666
I have seen a lot of posts on this topic, however I have not found regarding this warning:
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_PYTHON_SUPPORT
when I compile with cmake. When building OpenCV with this warning, it turns out that it doesn't include python support (surprise).
I use this command to compile the build-files
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
I have installed python-dev.
Upvotes: 7
Views: 8162
Reputation: 3853
Simple instructions to install opencv with python bindings in Linux - Ubuntu/Fedora
That's it, now go to python and try ">>> import cv2" you should not get any error message.
Tested on python 2.7, should be virtually similar to python 3.x.
Upvotes: 3
Reputation: 14011
It looks like you're using an old install guide. Use BUILD_NEW_PYTHON_SUPPORT
instead.
So, execute CMake like this:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
Also, if you use the CMake GUI, it is easier to see all of the options you can set for OpenCV (there are so many it's quite tedious to type them all on the command-line). To get it for Ubuntu, do this:
sudo apt-get install cmake-qt-gui
Upvotes: 16