如何指定升压的路径,以便在Ubuntu上成功构建Dlib

发布于 2025-01-19 02:18:13 字数 741 浏览 0 评论 0原文

我正在尝试在 ubuntu 上安装人脸识别,但 dlib 始终无法构建。我尝试运行 python3 setup.py install 但它返回了一些有关 boost 的错误。安装boost后还是找不到。

  1. 如何指定boost的路径(对于/path/to/dir/boost_1_78_0和/path/to/dir/boost_1_78_0/stage/lib) 在线资源建议我将其附加到 CMakeLists.txt,但 dlib-19.6 文件夹中有两个具有该名称的文件。 /path-to-dir/dlib19.6 有 CMakeLists.txt 和 /path-to-dir/dlib19.6/dlib 也有 CMakeLists.txt。哪一个是正确的?

  2. 如何解决以下问题:

    /tmp/pip-install-md97yl8n/dlib_c8973decd1e045cb9182990e2e1f228e/dlib/external/pybind11/include/pybind11/detail/common.h:112:10:致命错误:Python.h:没有这样的文件或目录 112 | 112 #include; | ^~~~~~~~~~ 编译终止。

这是我运行 pip installface-recognition 时终端输出的错误消息的一部分

  1. 有什么方法可以自动安装 dlib 和 boost 并让系统自动指定必要的路径?

I'm trying to install face-recognition on ubuntu but dlib keeps failing to build. I tried running python3 setup.py install but it returned some error about boost. After installing boost it still can't locate it.

  1. how can I specify the paths for boost(for /path/to/dir/boost_1_78_0 and /path/to/dir/boost_1_78_0/stage/lib)
    An online source suggested that I append it to the CMakeLists.txt but there are two files with that name in the dlib-19.6 folder.ie. /path-to-dir/dlib19.6 has CMakeLists.txt and /path-to-dir/dlib19.6/dlib also has CMakeLists.txt. which one is the right one?

  2. how can I solve the issue below:

    /tmp/pip-install-md97yl8n/dlib_c8973decd1e045cb9182990e2e1f228e/dlib/external/pybind11/include/pybind11/detail/common.h:112:10: fatal error: Python.h: No such file or directory
    112 | #include <Python.h>
    | ^~~~~~~~~~
    compilation terminated.

which is part of the error message output by the terminal when I run pip install face-recognition

  1. is there any way that I could automatically install dlib and boost and have the system automatically specify the necessary paths?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文