Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 文件字符串文件"/opt/intel/mkl/include/mkl_version.h“;无法读取_Python_Opencv_Ubuntu_Cmake - Fatal编程技术网

Python 文件字符串文件"/opt/intel/mkl/include/mkl_version.h“;无法读取

Python 文件字符串文件"/opt/intel/mkl/include/mkl_version.h“;无法读取,python,opencv,ubuntu,cmake,Python,Opencv,Ubuntu,Cmake,对于Python 3.4.3、Ubuntu 14.04、CUDA 8和最新版本的OpenCV,请从OpenCV网站下载并使用以下命令: (cv2) mona@pascal:~/computer_vision/opencv-3.2.0/build$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. 我得到以下错误。请建议修复 -- checking for module 'libgphoto2' --

对于Python 3.4.3、Ubuntu 14.04、CUDA 8和最新版本的OpenCV,请从OpenCV网站下载并使用以下命令:

(cv2) mona@pascal:~/computer_vision/opencv-3.2.0/build$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
我得到以下错误。请建议修复

-- checking for module 'libgphoto2'
--   package 'libgphoto2' not found
-- ICV: Downloading ippicv_linux_20151201.tgz...
-- ICV: Unpacking ippicv_linux_20151201.tgz to /home/mona/computer_vision/opencv-3.2.0/build/3rdparty/ippicv...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /home/mona/computer_vision/opencv-3.2.0/build/3rdparty/ippicv/ippicv_lnx
-- CUDA detected: 8.0
-- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES
CMake Error at cmake/OpenCVFindMKL.cmake:32 (file):
  file STRINGS file "/opt/intel/mkl/include/mkl_version.h" cannot be read.
Call Stack (most recent call first):
  cmake/OpenCVFindMKL.cmake:72 (get_mkl_version)
  cmake/OpenCVFindLAPACK.cmake:10 (include)
  CMakeLists.txt:559 (include)<!--

CMake Error at cmake/OpenCVFindMKL.cmake:90 (if):
  if given arguments:

    "VERSION_GREATER" "11.3.0" "OR" "VERSION_EQUAL" "11.3.0"

  Unknown arguments specified
Call Stack (most recent call first):
  cmake/OpenCVFindLAPACK.cmake:10 (include)
  CMakeLists.txt:559 (include)


-- Configuring incomplete, errors occurred!
--正在检查模块'libgphoto2'
--找不到程序包“libgphoto2”
--ICV:正在下载ippicv_linux_20151201.tgz。。。
--ICV:将ippicv_linux_20151201.tgz解包到/home/mona/computer_vision/opencv-3.2.0/build/第三方/ippicv。。。
--ICV:包已成功下载
--发现IPP(ICV版本):9.0.1[9.0.1]
--在:/home/mona/computer_vision/opencv-3.2.0/build/第三方/ippicv/ippicv_lnx
--检测到CUDA:8.0
--CUDA NVCC目标标志:-gencode;arch=compute_20,code=sm_20-根代码;arch=compute_30,code=sm_30-根代码;arch=compute_35,code=sm_35-根代码;arch=compute_37,code=sm_37-根代码;arch=compute_50,code=sm_50-根代码;arch=compute_52,code=sm_52-根代码;arch=compute_60,code=sm_60-根代码;arch=compute_61,code=sm_61-D_力线
CMake/OpenCVFindMKL处的CMake错误。CMake:32(文件):
无法读取文件字符串file“/opt/intel/mkl/include/mkl_version.h”。
调用堆栈(最新调用优先):
cmake/OpenCVFindMKL.cmake:72(获取mkl版本)
cmake/OpenCVFindLAPACK.cmake:10(包括)

CMakeLists.txt:559(include)安装最新版本的英特尔MKL,问题应该得到解决。我在我的机器上有一个旧版本。基本上,只需下载l_mkl_2017.0.098.tgz并键入
sudo./install.sh
,然后按照对话进行选择。这是一个简单的安装

成功使用cmake后,您应该有一份类似于以下内容的报告:

-- General configuration for OpenCV 3.2.0 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Timestamp:                   2017-01-19T02:54:29Z
--     Host:                        Linux 3.13.0-62-generic x86_64
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 5.4.1)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          /usr/lib/x86_64-linux-gnu/libwebp.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libjasper.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so gtk-3 gdk-3 atk-1.0 gio-2.0 pangocairo-1.0 gdk_pixbuf-2.0 cairo-gobject pango-1.0 cairo gobject-2.0 glib-2.0 gthread-2.0 gstbase-0.10 gstreamer-0.10 gmodule-2.0 xml2 gstvideo-0.10 gstapp-0.10 gstriff-0.10 gstpbutils-0.10 dc1394 avcodec avformat avutil swscale vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport dl m pthread rt /opt/intel/mkl/lib/intel64/libmkl_core.so /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/mkl/lib/intel64/libmkl_sequential.so -lpthread -lm -ldl cudart nppc nppi npps cufft -L/usr/local/cuda-8.0/lib64
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 cudev core cudaarithm flann imgproc ml video viz cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo java stitching superres videostab python2
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 python3
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.8)
--     GThread :                    YES (ver 2.40.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 YES (ver 6.0.0)
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
--     WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0202)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.50)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 1.6.1)
--     GDAL:                        NO
--     GDCM:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.1)
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 54.35.1)
--       avformat:                  YES (ver 54.20.4)
--       avutil:                    YES (ver 52.3.0)
--       swscale:                   YES (ver 2.1.1)
--       avresample:                NO
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     Aravis SDK:                  NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/YES
--     XIMEA:                       NO
--     Xine:                        NO
--     gPhoto2:                     NO
-- 
--   Parallel framework:            pthreads
-- 
--   Other third-party libraries:
--     Use IPP:                     9.0.1 [9.0.1]
--          at:                     /home/mona/computer_vision/opencv-3.2.0/build/3rdparty/ippicv/ippicv_lnx
--     Use IPP Async:               NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Lapack:                  YES (/opt/intel/mkl/lib/intel64/libmkl_core.so /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/mkl/lib/intel64/libmkl_sequential.so /opt/intel/mkl/lib/intel64/libmkl_core.so /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/mkl/lib/intel64/libmkl_sequential.so /opt/intel/mkl/lib/intel64/libmkl_core.so /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/mkl/lib/intel64/libmkl_sequential.so -lpthread -lm -ldl)
--     Use Eigen:                   YES (ver 3.2.0)
--     Use Cuda:                    YES (ver 8.0)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             20 30 35 37 50 52 60 61
--     NVIDIA PTX archs:
--     Use fast math:               NO
-- 
--   OpenCL:                        <Dynamic loading of OpenCL library>
--     Include path:                /home/mona/computer_vision/opencv-3.2.0/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6)
--     numpy:                       /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.11.1)
--     packages path:               lib/python2.7/dist-packages
-- 
--   Python 3:
--     Interpreter:                 /home/mona/.virtualenvs/cv2/bin/python3.4 (ver 3.4.3)
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /usr/bin/ant (ver 1.9.3)
--     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         /usr/local/MATLAB/R2014b/bin/mex
--     Compiler/generator:          Not working (bindings will not be generated)
-- 
--   Documentation:
--     Doxygen:                     /usr/bin/doxygen (ver 1.8.6)
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/mona/computer_vision/opencv-3.2.0/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mona/computer_vision/opencv-3.2.0/build
——OpenCV 3.2.0的常规配置=====================================
--版本控制:未知
-- 
--站台:
--时间戳:2017-01-19T02:54:29Z
--主机:Linux 3.13.0-62-generic x86_64
--CMake:2.8.12.2
--CMake生成器:Unix生成文件
--CMake构建工具:/usr/bin/make
--配置:发布
-- 
--C/C++:
--构建为动态库?:是
C++编译器:/Ur/bin /C++(VE5.4.1)
——C++标志(发布):-fsigned char-W-Wall-Werror=return type-Werror=non-virtual dtor-Werror=address-Werror=sequence point-Wformat-Werror=format security-Wmissing declarations-Wundef-Winit self-Wpointer arith-Wshadow-Wsign promo-Wno-nerroring-Wno删除非虚拟dtor-Wno注释-fdiagnostics show选项-Wno long-pthread-fomit帧指针-msse-msse2-mno avx-msse3-mno-ssse3-mno-sse4.1-mno-sse4.2-F功能部分-fvisibility=hidden-fvisibility inlines hidden-O3-DNDEBUG-DNDEBUG
——C++标志(调试):-fsigned char-W-Wall-Werror=return type-Werror=non-virtual dtor-Werror=address-Werror=sequence point-Wformat-Werror=format security-Wmissing declarations-Wundef-Winit self-Wpointer arith-Wshadow-Wsign promo-Wno-nerroring-Wno删除非虚拟dtor-Wno注释-fdiagnostics show选项-Wno long-pthread-fomit帧指针-msse-msse2-mno avx-msse3-mno-ssse3-mno-sse4.1-mno-sse4.2-F功能部分-fvisibility=hidden-fvisibility inlines hidden-g-O0-DDEBUG-D_调试
--C编译器:/usr/bin/cc
--C标志(发布):-fsigned char-W-Wall-Werror=return type-Werror=non-virtual dtor-Werror=address-Werror=sequence point-Wformat-Werror=format security-Wmissing声明-Wmissing原型-Wstrict原型-Wundef-Winit self-Wpointer arith-Wshadow-Wno狭窄-Wno注释-fdiagnostics show选项-Wno long-pthread-fomit帧指针-msse-msse2-mno avx-msse3-mno-ssse3-mno-sse4.1-mno-sse4.2-F功能部分-fvisibility=隐藏-O3-DNDEBUG-DNDEBUG
--C标志(调试):-fsigned char-W-Wall-Werror=return type-Werror=non-virtual dtor-Werror=address-Werror=sequence point-Wformat-Werror=format security-Wmissing声明-Wmissing原型-Wstrict原型-Wundef-Winit self-Wpointer arith-Wshadow-Wno狭窄-Wno注释-fdiagnostics show选项-Wno long-pthread-fomit帧指针-msse-msse2-mno avx-msse3-mno-ssse3-mno-sse4.1-mno-sse4.2-F功能部分-fvisibility=hidden-g-O0-DDEBUG-D_DEBUG
--链接器标志(发布):
--链接器标志(调试):
--卡切:没有
--预编译头:是
--额外依赖项:/usr/lib/x86_64-linux-gnu/libwebp.so/usr/lib/x86_64-linux-gnu/libpng.so/usr/lib/x86_64-linux-gnu/libz.so/usr/lib/x86_64-linux-gnu/libtiff.so/usr/lib/x86_64-linux-gnu.so/usr/libjasper.so/lib/x86_64-linux-gnu/libjpeg.so/libjpeg.so/usr/lib/usr/lib/x86_64-linux-gnu/libIex.so/usr/lib/x86_64-linux-gnu/libHalf.so/usr/lib/x86_64-linux-gnu/libIlmThread.so gtk-3 gdk-3 atk-1.0 gio-2.0 pangocairo-1.0 gdk-pixbuf-2.0 cairo gobject-pango-1.0 cairo gobject-2.0 glib-2.0 gthread-2.0 gstbase-0.10-0 gstbase-0-0.10-gstp-10-10-gstp-10avcodec avformat avutil swscale vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY VTKfilters纹理vtkRenderingFreeType VTKIO导出dl m pthread rt/opt/intel/mkl/lib/libmkl_core.so/opt/intel/mkl/lib/lib/lib/lib/lib/lib/lib/lib/u intel/lp64.so/opt/intel/intel/mkl/lib/lib/lib/l/lib/l/lib/l/lib/l/lib/lib/l/lib/l/lib/lib/l/lib/l/l-L/usr/local/cuda-8.0/lib64
--第三方依赖关系:
-- 
--OpenCV模块:
--待构建:cudev核心cudaarithm flann imgproc ml viz cudabgsegm cudafilters CUDAIMG PROC cudawarping imgcodecs照片形状视频IO cudacodec highgui objdetect ts功能2D calib3d CUDAFACTURES 2D cudalegacy cudaobjdetect cudaoptflow CUDAOFFLOW CUDA立体java缝合超分辨率VIDEROSTAB pytho