gpt4 book ai didi

python - 在 Ubuntu 上安装 OpenCV 时出现 "fatal error: Eigen/Core: No such file or directory"

转载 作者:行者123 更新时间:2023-12-04 18:57:10 26 4
gpt4 key购买 nike

我正在从此处的官方 OpenCV 版本 https://docs.opencv.org/4.1.0/d2/de6/tutorial_py_setup_in_ubuntu.html 在 Ubuntu 18.04 LTS 中安装用于 Python 的 opencv

在创建构建目录并输入 cmake ../之后,我输入命令使其生成以下错误 -
以前我在 Windows 上使用过 OpenCV。我是 Ubuntu 的新手。请帮忙。

In file included from /home/avi/opencv/modules/core/test/test_precomp.hpp:12:0,
from /home/avi/opencv/build/modules/core/opencv_test_core_pch_dephelp.cxx:1:
/home/avi/opencv/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~
compilation terminated.
modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o] Error 1
CMakeFiles/Makefile2:1287: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

最佳答案

转至 /home/avi/opencv/modules/core/include/opencv2/core/private.hpp文件。

编辑该行:# include <Eigen/Core># include <eigen3/Eigen/Core>
here 阅读有关此错误的更多信息.

关于python - 在 Ubuntu 上安装 OpenCV 时出现 "fatal error: Eigen/Core: No such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57134411/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com