Python 无法为 dlib Ubuntu 构建轮子

标签 python python-3.x git pip dlib

我正在尝试将 dlib 安装到我的 python 虚拟环境中。

有一个非常相似的问题here我按照确切的步骤进行操作,但没有成功。

不知何故,我能够在运行代码时导入 dlib,并且我设法通过 git 克隆 git clone -b pybind11 https://github.com/supervacuus/dlib.git 来做到这一 pip 。

但是当我尝试安装它pip3 install dlib或依赖于它的库(例如pip3 install face_recognition)时,我收到错误消息,指出错误:dlib 构建轮子失败

此处有完整的执行日志和错误 https://gist.github.com/GhettoBurger996/1e6a423b88b7435c8759255e19fa5e60

我使用的是 3.5.2 和 Ubuntu 16.04

最佳答案

问题有 pip 老了,但我遇到了类似的问题,使用 pip3 安装 dlib 会失败。

安装以下依赖项为我解决了这个问题:

$ sudo apt-get install build-essential cmake
$ sudo apt-get install libgtk-3-dev
$ sudo apt-get install libboost-all-dev

从发布的错误日志来看,您似乎已经安装了 cmake,因此您可能不需要第一行。

关于Python 无法为 dlib Ubuntu 构建轮子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56729878/

相关文章:

python - 类变量和实例变量有什么区别?

python - 强制 pyplot 显示实际轴值

python - 单元测试 : Does it make sense to test parent object methods?

python - 基于键对少数字典的操作

git - 尝试运行时出错 `flutter upgrade`

git - 如何关闭vscode中的git diff面板?

Git - 将 master merge 回 develop?

python - 取同一天 Pandas 内的数据平均值

python - python中无替换的Word Ladder

python-3.x - xml.parsers.expat.ExpatError : not well-formed (invalid token)