python构建完整应用程序错误_尝试在python中构建opencv的问题:“-配置不完整,发生了错误”;...

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:

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$

解决方案

As mentioned on this here I tried checkout the same version for opencv_contrib that I did for opencv by running the following command:

cd ~

cd opencv

git checkout 3.0.0

cd ~

cd opencv_contrib

git checkout 3.0.0

It worked

I then ran the command make -j4

but the two following error messages appeared:

In file included from /Users/mymac/opencv_contrib/modules/cvv/src/gui/main_call_window.cpp:1:

In file included from /Users/mymac/opencv_contrib/modules/cvv/src/gui/main_call_window.hpp:9:

In file included from /Users/mymac/opencv_contrib/modules/cvv/src/gui/overview_panel.hpp:12:/Users/mymac/opencv_contrib/modules/cvv/src/gui/../stfl/stfl_engine.hpp:1056:30: error: use 'template' keyword to treat

'value' as a dependent template name

return settings.value(key).value();

^

template

In file included from /Users/mymac/opencv_contrib/modules/cvv/src/controller/view_controller.cpp:12:

In file included from /Users/mymac/opencv_contrib/modules/cvv/src/controller/../gui/overview_panel.hpp:12: /Users/mymac/opencv_contrib/modules/cvv/src/controller/../gui/../stfl/stfl_engine.hpp:1056:30: error: use 'template'

keyword to treat 'value' as a dependent template name

return settings.value(key).value();

^

template

For this i created a new question here

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值