Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problems with building OpenCV-Python: the build_opencv_python module is missing

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text

According to the tutorial, when I configure all modules of opencv source to compile, I should see also module named build_opencv_pyhton between them. However, I do not see it and also after installation performed in Visual Studio I cannot import module cv2 into any python script.

Tutorial modules: tutorial modules

My modules: my modules

What am I doing wrong? Only one difference between the tutorial and my situation is that I am using python version 3.5, not 2.7 as stays in the tutorial.

Problems with building OpenCV-Python: the build_opencv_python module is missing

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text

According to the tutorial, when I configure all modules of opencv source to compile, I should see also module named build_opencv_pyhton between them. However, I do not see it and also after installation performed in Visual Studio I cannot import module cv2 into any python script.

Tutorial modules: tutorial modules

My modules: my modules

CMake output:

FP16: Compiler support is available A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. found IPP (ICV version): 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Found PythonInterp: C:/Program Files (x86)/Python/python.exe (found suitable version "3.5.1", minimum required is "2.7") Found apache ant 1.9.6: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat 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

General configuration for OpenCV 3.1.0-dev ===================================== Version control: unknown

Platform: Timestamp: 2016-12-15T17:58:03Z Host: Windows 10.0.14393 AMD64 CMake: 3.4.1 CMake generator: Visual Studio 14 2015 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900

C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe (ver 19.0.23506.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:X86 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf

OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz

Windows RT support: NO

GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO

Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO

Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.64.101) avformat: YES (ver 57.56.100) avutil: YES (ver 55.34.100) swscale: YES (ver 4.2.100) avresample: YES (ver 3.1.0) GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

Parallel framework: Concurrency

Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: NO Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO

OpenCL: <dynamic loading="" of="" opencl="" library=""> Include path: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO

Python 2: Interpreter: NO

Python 3: Interpreter: C:/Program Files (x86)/Python/python.exe (ver 3.5.1)

Python (for build): C:/Program Files (x86)/Python/python.exe

Java: ant: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat (ver 1.9.6) JNI: C:/Program Files/Java/jdk1.8.0_65/include C:/Program Files/Java/jdk1.8.0_65/include/win32 C:/Program Files/Java/jdk1.8.0_65/include Java wrappers: YES Java tests: YES

Matlab: Matlab not found or implicitly disabled

Documentation: Doxygen: NO

Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO

Install path: D:/Development/opencv_3.1.0/build/install

cvconfig.h is in: D:/Development/opencv_3.1.0/build

Configuring done

What am I doing wrong? Only one difference between the tutorial and my situation is that I am using python version 3.5, not 2.7 as stays in the tutorial.

click to hide/show revision 3
No.3 Revision

updated 2016-12-15 12:17:28 -0500

berak gravatar image

Problems with building OpenCV-Python: the build_opencv_python module is missing

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text

According to the tutorial, when I configure all modules of opencv source to compile, I should see also module named build_opencv_pyhton between them. However, I do not see it and also after installation performed in Visual Studio I cannot import module cv2 into any python script.

Tutorial modules: tutorial modules

My modules: my modules

CMake output:

FP16: Compiler support is available
A library with BLAS API not found. Please specify library location.
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
found IPP (ICV version): 9.0.1 [9.0.1]
at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
Found PythonInterp: C:/Program Files (x86)/Python/python.exe (found suitable version "3.5.1", minimum required is "2.7") 
Found apache ant 1.9.6: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat
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

file General configuration for OpenCV 3.1.0-dev ===================================== Version control: unknown

unknown Platform: Timestamp: 2016-12-15T17:58:03Z Host: Windows 10.0.14393 AMD64 CMake: 3.4.1 CMake generator: Visual Studio 14 2015 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900

1900 C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe (ver 19.0.23506.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:X86 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf

IlmImf OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz

viz Windows RT support: NO

NO GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO

NO Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO

NO Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.64.101) avformat: YES (ver 57.56.100) avutil: YES (ver 55.34.100) swscale: YES (ver 4.2.100) avresample: YES (ver 3.1.0) GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

NO Parallel framework: Concurrency

Concurrency Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: NO Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO

NO OpenCL: <dynamic loading="" of="" opencl="" library=""> <Dynamic loading of OpenCL library> Include path: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO

NO Python 2: Interpreter: NO

NO Python 3: Interpreter: C:/Program Files (x86)/Python/python.exe (ver 3.5.1)

3.5.1) Python (for build): C:/Program Files (x86)/Python/python.exe

(x86)/Python/python.exe Java: ant: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat (ver 1.9.6) JNI: C:/Program Files/Java/jdk1.8.0_65/include C:/Program Files/Java/jdk1.8.0_65/include/win32 C:/Program Files/Java/jdk1.8.0_65/include Java wrappers: YES Java tests: YES

YES Matlab: Matlab not found or implicitly disabled

disabled Documentation: Doxygen: NO

NO Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO

NO Install path: D:/Development/opencv_3.1.0/build/install

D:/Development/opencv_3.1.0/build/install cvconfig.h is in: D:/Development/opencv_3.1.0/build

D:/Development/opencv_3.1.0/build ----------------------------------------------------------------- Configuring done

done

What am I doing wrong? Only one difference between the tutorial and my situation is that I am using python version 3.5, not 2.7 as stays in the tutorial.

Problems with building OpenCV-Python: the build_opencv_python module is missing

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text

According to the tutorial, when I configure all modules of opencv source to compile, I should see also module named build_opencv_pyhton between them. However, I do not see it and also after installation performed in Visual Studio I cannot import module cv2 into any python script.

Tutorial modules: tutorial modules

My modules: my modules

CMake output:

FP16: Compiler support is available
A library with BLAS API not found. Please specify library location.
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
found IPP (ICV version): 9.0.1 [9.0.1]
at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
Found PythonInterp: C:/Program Files (x86)/Python/python.exe (found suitable version "3.5.1", minimum required is "2.7") 
Found apache ant 1.9.6: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat
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

General configuration for OpenCV 3.1.0-dev =====================================
  Version control:               unknown

  Platform:
    Timestamp:                   2016-12-15T17:58:03Z
    Host:                        Windows 10.0.14393 AMD64
    CMake:                       3.4.1
    CMake generator:             Visual Studio 14 2015
    CMake build tool:            C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
    MSVC:                        1900

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe  (ver 19.0.23506.0)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast  /wd4251 /wd4324 /wd4275 /wd4589 /MP8  /MD /O2 /Ob2 /D NDEBUG  /Zi
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast  /wd4251 /wd4324 /wd4275 /wd4589 /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast    /MP8  /MD /O2 /Ob2 /D NDEBUG  /Zi
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast    /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:X86  /INCREMENTAL:NO  /debug
    Linker flags (Debug):        /machine:X86  /debug /INCREMENTAL 
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:          comctl32 gdi32 ole32 setupapi ws2_32 vfw32
    3rdparty dependencies:       zlib libjpeg libwebp libpng libtiff libjasper IlmImf

  OpenCV modules:
    To be built:                 core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz

  Windows RT support:            NO

  GUI: 
    QT:                          NO
    Win32 UI:                    YES
    OpenGL support:              NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.8)
    JPEG:                        build (ver 90)
    WEBP:                        build (ver 0.3.1)
    PNG:                         build (ver 1.6.24)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    GDAL:                        NO
    GDCM:                        NO

  Video I/O:
    Video for Windows:           YES
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (ver 57.64.101)
      avformat:                  YES (ver 57.56.100)
      avutil:                    YES (ver 55.34.100)
      swscale:                   YES (ver 4.2.100)
      avresample:                YES (ver 3.1.0)
    GStreamer:                   NO
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    OpenNI2:                     NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    DirectShow:                  YES
    Media Foundation:            NO
    XIMEA:                       NO
    Intel PerC:                  NO

  Parallel framework:            Concurrency

  Other third-party libraries:
    Use IPP:                     9.0.1 [9.0.1]
         at:                     D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win
    Use IPP Async:               NO
    Use Lapack:                  NO
    Use Eigen:                   NO
    Use Cuda:                    NO
    Use OpenCL:                  YES
    Use OpenVX:                  NO
    Use custom HAL:              NO

  OpenCL:                        <Dynamic loading of OpenCL library>
    Include path:                D:/Development/opencv_3.1.0/sources/opencv/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO

  Python 2:
    Interpreter:                 NO

  Python 3:
    Interpreter:                 C:/Program Files (x86)/Python/python.exe (ver 3.5.1)

  Python (for build):            C:/Program Files (x86)/Python/python.exe

  Java:
    ant:                         C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat (ver 1.9.6)
    JNI:                         C:/Program Files/Java/jdk1.8.0_65/include C:/Program Files/Java/jdk1.8.0_65/include/win32 C:/Program Files/Java/jdk1.8.0_65/include
    Java wrappers:               YES
    Java tests:                  YES

  Matlab:                        Matlab not found or implicitly disabled

  Documentation:
    Doxygen:                     NO

  Tests and samples:
    Tests:                       YES
    Performance tests:           YES
    C/C++ Examples:              NO

  Install path:                  D:/Development/opencv_3.1.0/build/install

  cvconfig.h is in:              D:/Development/opencv_3.1.0/build
-----------------------------------------------------------------

Configuring done

What am I doing wrong? Only one difference between the tutorial and my situation is that I am using python version 3.5, not 2.7 as stays in the tutorial.

Problems with building OpenCV-Python: the build_opencv_python module is missingCould NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) for Python 3.5 support for OpenCV 3.1.0 on Windows

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text
  • Windows 10 64bit

According After I run the build I can see that CMake cant find some source directories for building python3 module:

Found PythonInterp: C:/Program Files (x86)/Python27/python2.exe (found suitable version "2.7.12", minimum required is "2.7") Found PythonLibs: C:/Program Files (x86)/Python27/libs/python27.lib (found suitable exact version "2.7.12") Found PythonInterp: C:/Program Files (x86)/Python35/python3.exe (found suitable version "3.5.1", minimum required is "3.4") Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1")

However the missing directories for Python3 are not missing for Python2. Python3 has equal folder structure on my computer as Python2.

However, the python3 module is still unavailable among opencv modules: OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab python2 Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 viz

I can not find the reason why CMake is not able to the tutorial, when I configure all modules of opencv source to compile, I should see find those paths. It finds right path for python3 executable, why not also module named build_opencv_pyhton between them. However, I do not see it include directory and also after installation performed in Visual Studio I cannot import module cv2 into any python script. python35.lib file?

Full CMake output:

The CXX compiler identification is MSVC 19.0.23506.0 The C compiler identification is MSVC 19.0.23506.0 Check for working CXX compiler using: Visual Studio 14 2015 Check for working CXX compiler using: Visual Studio 14 2015 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Check for working C compiler using: Visual Studio 14 2015 Check for working C compiler using: Visual Studio 14 2015 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Performing Test HAVE_CXX_FSIGNED_CHAR Performing Test HAVE_CXX_FSIGNED_CHAR - Failed Performing Test HAVE_C_FSIGNED_CHAR Performing Test HAVE_C_FSIGNED_CHAR - Failed FP16: Compiler support is available Check if the system is big endian Searching 16 bit integer Looking for sys/types.h Looking for sys/types.h - found Looking for stdint.h Looking for stdint.h - found Looking for stddef.h Looking for stddef.h - found Check size of unsigned short Check size of unsigned short - done Using unsigned short Check if the system is big endian - little endian Looking for fseeko Looking for fseeko - not found Looking for unistd.h Looking for unistd.h - not found Check size of off64_t Check size of off64_t - failed Looking for assert.h Looking for assert.h - found Looking for fcntl.h Looking for fcntl.h - found Looking for io.h Looking for io.h - found Looking for jbg_newlen Looking for jbg_newlen - not found Looking for mmap Looking for mmap - not found Looking for search.h Looking for search.h - found Looking for string.h Looking for string.h - found Looking for unistd.h Looking for unistd.h - not found Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE
A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. ICV: Removing previous unpacked package: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack ICV: Unpacking ippicv_windows_20151201.zip to D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack... ICV: Package successfully downloaded found IPP (ICV version): 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Found PythonInterp: C:/Program Files (x86)/Python/python.exe (x86)/Python27/python2.exe (found suitable version "2.7.12", minimum required is "2.7") Found PythonLibs: C:/Program Files (x86)/Python27/libs/python27.lib (found suitable exact version "2.7.12") Found PythonInterp: C:/Program Files (x86)/Python35/python3.exe (found suitable version "3.5.1", minimum required is "2.7") "3.4") Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1") Found apache ant 1.9.6: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat Found JNI: C:/Program Files/Java/jdk1.8.0_65/lib/jawt.lib
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 file

General configuration for OpenCV 3.1.0-dev ===================================== Version control: unknown unknown

Platform: Timestamp: 2016-12-15T17:58:03Z 2016-12-17T13:04:19Z Host: Windows 10.0.14393 AMD64 CMake: 3.4.1 CMake generator: Visual Studio 14 2015 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900 1900

C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe (ver 19.0.23506.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:X86 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf IlmImf

OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab videostab python2 Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz viz

Windows RT support: NO NO

GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO NO

Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO NO

Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.64.101) avformat: YES (ver 57.56.100) avutil: YES (ver 55.34.100) swscale: YES (ver 4.2.100) avresample: YES (ver 3.1.0) GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO NO

Parallel framework: Concurrency Concurrency

Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: NO Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO NO

OpenCL: <Dynamic loading of OpenCL library> <dynamic loading="" of="" opencl="" library=""> Include path: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO NO

Python 2: Interpreter: NO C:/Program Files (x86)/Python27/python2.exe (ver 2.7.12) Libraries: C:/Program Files (x86)/Python27/libs/python27.lib (ver 2.7.12) numpy: C:/Program Files (x86)/Python27/lib/site-packages/numpy/core/include (ver 1.11.2) packages path: C:/Program Files (x86)/Python27/Lib/site-packages

Python 3: Interpreter: C:/Program Files (x86)/Python/python.exe (x86)/Python35/python3.exe (ver 3.5.1) 3.5.1)

Python (for build): C:/Program Files (x86)/Python/python.exe (x86)/Python27/python2.exe

Java: ant: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat (ver 1.9.6) JNI: C:/Program Files/Java/jdk1.8.0_65/include C:/Program Files/Java/jdk1.8.0_65/include/win32 C:/Program Files/Java/jdk1.8.0_65/include Java wrappers: YES Java tests: YES YES

Matlab: Matlab not found or implicitly disabled disabled

Documentation: Doxygen: NO NO

Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO NO

Install path: D:/Development/opencv_3.1.0/build/install D:/Development/opencv_3.1.0/build/install

cvconfig.h is in: D:/Development/opencv_3.1.0/build ----------------------------------------------------------------- D:/Development/opencv_3.1.0/build

Configuring done

What am I doing wrong? Only one difference between the tutorial and my situation is that I am using python version 3.5, not 2.7 as stays in the tutorial. done

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) for Python 3.5 support for OpenCV 3.1.0 on Windows

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text
  • Windows 10 64bit

After I run the build I can see that CMake cant find some source directories for building python3 module:

Found PythonInterp: C:/Program Files (x86)/Python27/python2.exe (found suitable version "2.7.12", minimum required is "2.7") Found PythonLibs: C:/Program Files (x86)/Python27/libs/python27.lib (found suitable exact version "2.7.12") Found PythonInterp: C:/Program Files (x86)/Python35/python3.exe (found suitable version "3.5.1", minimum required is "3.4") Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1")

However the missing directories for Python3 are not missing for Python2. Python3 has equal folder structure on my computer as Python2.

However, the python3 module is still unavailable among opencv modules: OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab python2 Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 viz

I can not find the reason why CMake is not able to find those paths. It finds right path for python3 executable, why not also include directory and python35.lib file?

Full CMake output:

The CXX compiler identification is MSVC 19.0.23506.0 The C compiler identification is MSVC 19.0.23506.0 Check for working CXX compiler using: Visual Studio 14 2015 Check for working CXX compiler using: Visual Studio 14 2015 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Check for working C compiler using: Visual Studio 14 2015 Check for working C compiler using: Visual Studio 14 2015 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Performing Test HAVE_CXX_FSIGNED_CHAR Performing Test HAVE_CXX_FSIGNED_CHAR - Failed Performing Test HAVE_C_FSIGNED_CHAR Performing Test HAVE_C_FSIGNED_CHAR - Failed FP16: Compiler support is available Check if the system is big endian Searching 16 bit integer Looking for sys/types.h Looking for sys/types.h - found Looking for stdint.h Looking for stdint.h - found Looking for stddef.h Looking for stddef.h - found Check size of unsigned short Check size of unsigned short - done Using unsigned short Check if the system is big endian - little endian Looking for fseeko Looking for fseeko - not found Looking for unistd.h Looking for unistd.h - not found Check size of off64_t Check size of off64_t - failed Looking for assert.h Looking for assert.h - found Looking for fcntl.h Looking for fcntl.h - found Looking for io.h Looking for io.h - found Looking for jbg_newlen Looking for jbg_newlen - not found Looking for mmap Looking for mmap - not found Looking for search.h Looking for search.h - found Looking for string.h Looking for string.h - found Looking for unistd.h Looking for unistd.h - not found Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE
A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. ICV: Removing previous unpacked package: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack ICV: Unpacking ippicv_windows_20151201.zip to D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack... ICV: Package successfully downloaded found IPP (ICV version): 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Found PythonInterp: C:/Program Files (x86)/Python27/python2.exe (found suitable version "2.7.12", minimum required is "2.7") Found PythonLibs: C:/Program Files (x86)/Python27/libs/python27.lib (found suitable exact version "2.7.12") Found PythonInterp: C:/Program Files (x86)/Python35/python3.exe (found suitable version "3.5.1", minimum required is "3.4") Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1") Found apache ant 1.9.6: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat Found JNI: C:/Program Files/Java/jdk1.8.0_65/lib/jawt.lib
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

General configuration for OpenCV 3.1.0-dev ===================================== Version control: unknown

Platform: Timestamp: 2016-12-17T13:04:19Z Host: Windows 10.0.14393 AMD64 CMake: 3.4.1 CMake generator: Visual Studio 14 2015 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900

C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe (ver 19.0.23506.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:X86 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf

OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab python2 Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 viz

Windows RT support: NO

GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO

Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO

Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.64.101) avformat: YES (ver 57.56.100) avutil: YES (ver 55.34.100) swscale: YES (ver 4.2.100) avresample: YES (ver 3.1.0) GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

Parallel framework: Concurrency

Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: NO Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO

OpenCL: <dynamic loading="" of="" opencl="" library=""> Include path: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO

Python 2: Interpreter: C:/Program Files (x86)/Python27/python2.exe (ver 2.7.12) Libraries: C:/Program Files (x86)/Python27/libs/python27.lib (ver 2.7.12) numpy: C:/Program Files (x86)/Python27/lib/site-packages/numpy/core/include (ver 1.11.2) packages path: C:/Program Files (x86)/Python27/Lib/site-packages

Python 3: Interpreter: C:/Program Files (x86)/Python35/python3.exe (ver 3.5.1)

Python (for build): C:/Program Files (x86)/Python27/python2.exe

Java: ant: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat (ver 1.9.6) JNI: C:/Program Files/Java/jdk1.8.0_65/include C:/Program Files/Java/jdk1.8.0_65/include/win32 C:/Program Files/Java/jdk1.8.0_65/include Java wrappers: YES Java tests: YES

Matlab: Matlab not found or implicitly disabled

Documentation: Doxygen: NO

Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO

Install path: D:/Development/opencv_3.1.0/build/install

cvconfig.h is in: D:/Development/opencv_3.1.0/build

Configuring done

click to hide/show revision 7
No.7 Revision

updated 2016-12-17 07:37:16 -0500

berak gravatar image

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) for Python 3.5 support for OpenCV 3.1.0 on Windows

I am trying to build the OpenCV from its sources and use its support for python. My predispositions:

  • downloaded latest opencv version 3.1.0
  • python 32bit version 3.5
  • numpy 32bit version 1.11.2
  • using CMake GUI for compilation
  • using Visual Studio Community 2015 for installation
  • using Visual Studio 2015 32bit compilator
  • following official tutorial: link text
  • Windows 10 64bit

After I run the build I can see that CMake cant find some source directories for building python3 module:

Found

**Found PythonInterp: C:/Program Files (x86)/Python27/python2.exe (found suitable version "2.7.12", minimum required is "2.7") 
Found PythonLibs: C:/Program Files (x86)/Python27/libs/python27.lib (found suitable exact version "2.7.12") 
Found PythonInterp: C:/Program Files (x86)/Python35/python3.exe (found suitable version "3.5.1", minimum required is "3.4") 
Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1")

"3.5.1")**

However the missing directories for Python3 are not missing for Python2. Python3 has equal folder structure on my computer as Python2.

However, **However, the python3 module is still unavailable among opencv modules: modules:

OpenCV modules:
    To be built:                 core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab python2
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 viz

viz**

I can not find the reason why CMake is not able to find those paths. It finds right path for python3 executable, why not also include directory and python35.lib file?

Full CMake output:

The CXX compiler identification is MSVC 19.0.23506.0
The C compiler identification is MSVC 19.0.23506.0
Check for working CXX compiler using: Visual Studio 14 2015
Check for working CXX compiler using: Visual Studio 14 2015 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Check for working C compiler using: Visual Studio 14 2015
Check for working C compiler using: Visual Studio 14 2015 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Performing Test HAVE_CXX_FSIGNED_CHAR
Performing Test HAVE_CXX_FSIGNED_CHAR - Failed
Performing Test HAVE_C_FSIGNED_CHAR
Performing Test HAVE_C_FSIGNED_CHAR - Failed
FP16: Compiler support is available
Check if the system is big endian
Searching 16 bit integer
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Check size of off64_t
Check size of off64_t - failed
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - not found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - not found
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE 
A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. ICV: Removing previous unpacked package: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack ICV: Unpacking ippicv_windows_20151201.zip to D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack... ICV: Package successfully downloaded found IPP (ICV version): 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Found PythonInterp: C:/Program Files (x86)/Python27/python2.exe (found suitable version "2.7.12", minimum required is "2.7") Found PythonLibs: C:/Program Files (x86)/Python27/libs/python27.lib (found suitable exact version "2.7.12") Found PythonInterp: C:/Program Files (x86)/Python35/python3.exe (found suitable version "3.5.1", minimum required is "3.4") Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1") Found apache ant 1.9.6: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat Found JNI: C:/Program Files/Java/jdk1.8.0_65/lib/jawt.lib
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

file General configuration for OpenCV 3.1.0-dev ===================================== Version control: unknown

unknown Platform: Timestamp: 2016-12-17T13:04:19Z Host: Windows 10.0.14393 AMD64 CMake: 3.4.1 CMake generator: Visual Studio 14 2015 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900

1900 C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe (ver 19.0.23506.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/IDEs/Visual Studio 2015 Community/VC/bin/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:X86 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf

IlmImf OpenCV modules: To be built: core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d java stitching videostab python2 Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 viz

viz Windows RT support: NO

NO GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO

NO Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO

NO Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.64.101) avformat: YES (ver 57.56.100) avutil: YES (ver 55.34.100) swscale: YES (ver 4.2.100) avresample: YES (ver 3.1.0) GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

NO Parallel framework: Concurrency

Concurrency Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: NO Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO

NO OpenCL: <dynamic loading="" of="" opencl="" library=""> <Dynamic loading of OpenCL library> Include path: D:/Development/opencv_3.1.0/sources/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO

NO Python 2: Interpreter: C:/Program Files (x86)/Python27/python2.exe (ver 2.7.12) Libraries: C:/Program Files (x86)/Python27/libs/python27.lib (ver 2.7.12) numpy: C:/Program Files (x86)/Python27/lib/site-packages/numpy/core/include (ver 1.11.2) packages path: C:/Program Files (x86)/Python27/Lib/site-packages

(x86)/Python27/Lib/site-packages Python 3: Interpreter: C:/Program Files (x86)/Python35/python3.exe (ver 3.5.1)

3.5.1) Python (for build): C:/Program Files (x86)/Python27/python2.exe

(x86)/Python27/python2.exe Java: ant: C:/Program Files/Apache Ant/apache-ant-1.9.6-bin/apache-ant-1.9.6/bin/ant.bat (ver 1.9.6) JNI: C:/Program Files/Java/jdk1.8.0_65/include C:/Program Files/Java/jdk1.8.0_65/include/win32 C:/Program Files/Java/jdk1.8.0_65/include Java wrappers: YES Java tests: YES

YES Matlab: Matlab not found or implicitly disabled

disabled Documentation: Doxygen: NO

NO Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO

NO Install path: D:/Development/opencv_3.1.0/build/install

D:/Development/opencv_3.1.0/build/install cvconfig.h is in: D:/Development/opencv_3.1.0/build

D:/Development/opencv_3.1.0/build ----------------------------------------------------------------- Configuring done

done