简体   繁体   English

OpenCV安装错误:没有这样的文件或目录“ pyopencv_generated_include.h”

[英]OpenCV installation error: No such file or directory “pyopencv_generated_include.h”

While trying to install OpenCV in linux 18.0.4 , after sudo make install command the following error stopped the execution. 尝试在linux 18.0.4安装OpenCV时,在sudo make install命令后,以下错误停止了执行。

[ 83%] Linking CXX executable ../../bin/opencv_perf_stitching
[ 83%] Built target opencv_perf_stitching
[ 83%] Generate files for Python bindings and documentation
[ 83%] Built target gen_opencv_python_source
Scanning dependencies of target opencv_python3
[ 83%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
/home/kk/opencv-3.4.1/modules/python/src2/cv2.cpp:22:10: fatal error: pyopencv_generated_include.h: No such file or directory
 #include "pyopencv_generated_include.h"
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o' failed
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
CMakeFiles/Makefile2:28439: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Any idea what heppend? 知道会发生什么吗?

I have CUDA 9.2, Python 3.6.5. 我有CUDA 9.2,Python 3.6.5。 Follwed the installation instructions given here.: https://www.pyimagesearch.com/2018/05/28/ubuntu-18-04-how-to-install-opencv/ 遵循此处给出的安装说明。: https ://www.pyimagesearch.com/2018/05/28/ubuntu-18-04-how-to-install-opencv/

I had the same issue during my OpenCV installation. 我在安装OpenCV时遇到了同样的问题。

We need to execute gen script manually (from /build one level up, in my case, from /opencv-3.4.3, for you, based on your opencv version is /opencv-3.4.1). 我们需要手动执行gen脚本(在我的情况下,从/ build上一级,从/opencv-3.4.3开始,基于您的opencv版本为/opencv-3.4.1)。

So, if you are in /build: 因此,如果您在/ build中:

cd ..
python ./modules/python/src2/gen2.py ./build/modules/python_bindings_generator ./build/modules/python_bindings_generator/headers.txt
cd build
sudo make install

Sources: 资料来源:

Hope it helps. 希望能帮助到你。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复 PyAudio、PortAudio 的安装问题:“致命错误 C1083:无法打开包含文件:'portaudio.h':没有这样的文件或目录” - How to fix installation issues for PyAudio, PortAudio: "fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory" 致命错误:numpy/arrayobject.h:google colab 中没有这样的文件或目录#include“numpy/arrayobject.h” - fatal error: numpy/arrayobject.h: No such file or directory #include "numpy/arrayobject.h" in google colab Ubuntu,致命错误:Python.h: No such file or directory #include<Python.h> - Ubuntu, fatal error: Python.h: No such file or directory #include <Python.h> C 致命错误:Python.h:没有这样的文件或目录#include<Python.h> - C fatal error: Python.h: No such file or directory #include <Python.h> Pygraphviz 安装失败,错误代码 1083 无法打开文件 graphviz/cgraph.h:没有这样的文件或目录 - Pygraphviz Installation Failed with error code 1083 Cannot open file graphviz/cgraph.h: No such file or directory 在Windows 8(x64)中安装期间PyOpenCL“致命错误:CL / cl.h:没有此类文件或目录”错误 - PyOpenCL “fatal error: CL/cl.h: No such file or directory” error during installation in Windows 8 (x64) Python(pip)软件包安装失败,并显示“严重错误:limits.h:无此类文件或目录” - Python (pip) package installation fails with 'fatal error: limits.h: No such file or directory' Mac OS X LION:python cxfreeze安装错误:stdarg.h:没有这样的文件或目录 - Mac osx LION :python cxfreeze installation error: stdarg.h: No such file or directory 致命错误 C1083:无法打开包含文件:“mecab.h”:没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory 致命错误 C1083:无法打开包含文件:'io.h':没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'io.h': No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM