I'm trying to install openCV in python
I have the same problem as mentioned in those several github and stackoverflow pages but I'm still stuck:
[github openCV issue #8382][1]
[github openCV issue #6027][2]
[github openCV issue #6066][3]
is it because the version of openCV and opencv_contrib do not match as mentionned here: [stackoverflow link][4]
Here is an ouput of the terminal:
mymacs-MacBook-Pro:build mymac$ cmake -D CMAKE_BUILD_TYPE=RELEASE \ > -D CMAKE_INSTALL_PREFIX=/usr/local \ > -D INSTALL_C_EXAMPLES=OFF \ > -D INSTALL_PYTHON_EXAMPLES=ON \ > -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ > -D BUILD_EXAMPLES=ON .. CMake Deprecation Warning at CMakeLists.txt:72 (cmake_policy): The OLD behavior for policy CMP0022 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:77 (cmake_policy): The OLD behavior for policy CMP0026 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:82 (cmake_policy): The OLD behavior for policy CMP0042 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. -- Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) -- Checking for module 'gstreamer-base-1.0' -- No package 'gstreamer-base-1.0' found -- Checking for module 'gstreamer-video-1.0' -- No package 'gstreamer-video-1.0' found -- Checking for module 'gstreamer-app-1.0' -- No package 'gstreamer-app-1.0' found -- Checking for module 'gstreamer-riff-1.0' -- No package 'gstreamer-riff-1.0' found -- Checking for module 'gstreamer-pbutils-1.0' -- No package 'gstreamer-pbutils-1.0' found -- Checking for module 'gstreamer-base-0.10' -- No package 'gstreamer-base-0.10' found -- Checking for module 'gstreamer-video-0.10' -- No package 'gstreamer-video-0.10' found -- Checking for module 'gstreamer-app-0.10' -- No package 'gstreamer-app-0.10' found -- Checking for module 'gstreamer-riff-0.10' -- No package 'gstreamer-riff-0.10' found -- Checking for module 'gstreamer-pbutils-0.10' -- No package 'gstreamer-pbutils-0.10' found -- Checking for module 'libv4l1' -- No package 'libv4l1' found -- Checking for module 'libv4l2' -- No package 'libv4l2' found -- Looking for linux/videodev.h -- Looking for linux/videodev.h - not found -- Looking for linux/videodev2.h -- Looking for linux/videodev2.h - not found -- Looking for sys/videoio.h -- Looking for sys/videoio.h - not found -- Checking for module 'libgphoto2' -- No package 'libgphoto2' found -- Found PythonInterp: /usr/local/bin/python2.7 (found suitable version "2.7.14", minimum required is "2.7") -- Found PythonLibs: /usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/bin (found suitable exact version "2.7.14") -- Found PythonInterp: /Users/mymac/.virtualenvs/cv/bin/python (found suitable version "3.5.4", minimum required is "3.4") -- Found PythonLibs: /usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m/libpython3.5.dylib (Required is exact version "3.5.4") -- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) -- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file -- Caffe: NO -- Protobuf: NO -- Glog: NO CMake Error at /Users/mymac/opencv_contrib/modules/datasets/CMakeLists.txt:7 (ocv_append_source_files_cxx_compiler_options): Unknown CMake command "ocv_append_source_files_cxx_compiler_options". -- Configuring incomplete, errors occurred! See also "/Users/mymac/opencv/build/CMakeFiles/CMakeOutput.log". See also "/Users/mymac/opencv/build/CMakeFiles/CMakeError.log". mymacs-MacBook-Pro:build mymac$