I have been struggling with compiling OpenCV for a while. The system is Linux Ubuntu 16.10.
Unfortunately it seems that the only library binding / module for Python that is being compiled is the one for Python 2.7, that gets installed at this location:
/usr/local/lib/python2.7/dist-packages/cv2.so
What I need instead is cv2
for python3.6
.
I have set up the link /usr/bin/python
to point to /usr/bin/python3.6
.
this is my cmake
directive:
cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-D OPENCV_EXTRA_MODULES_PATH=/home/foobar/Downloads/opencv_contrib/modules \
..
any idea on what might be going wrong?