【问题标题】:Problem with installing dlib module for python?为 python 安装 dlib 模块时出现问题?
【发布时间】:2020-10-14 05:23:11
【问题描述】:

请原谅我的无知。我是使用 OpenCv 的新手,需要安装 dlib 模块,但是当我尝试时出现以下错误

you have to use a version of Visual Studio that supports c ++ 11. Starting with
As of December 2017, the only version that has sufficient c ++ 11 compatibility
to compile the Python API dlib is a fully updated Visual Studio 2015 or a
Fully upgrade Visual Studio 2017. Previous versions of any of these completely
Visual Studio 2017 updated. The previous version of any of these compilers has
Poor c ++ 11 support and you will not be able to compile the python extension.
*** SO UPDATE YOUR VISUAL STUDY TO PERFORM THIS REMOTE ERROR ***

我使用 sublime text,但错误是由 Visual Studio 引起的,我不明白此模块是否必须使用 Visual Studio。

尽管出现错误,模块似乎已安装,因此可以导入,但它似乎不完整,因为使用dir(dlib) 查看其内容时,仅出现此内容

>>> import dlib
>>> dir (dlib)
['__doc__', '__loader__', '__name__', '__package__', '__path__', '__spec__']

我不知道它是否最终安装了,或者我是否需要解决该错误才能使用它,因为我说过我没有使用此模块的经验。

【问题讨论】:

  • 您是否从源代码编译了 DLib?还是只是点安装?
  • 我做了 porcess 安装 cmake 并直接从官方页面下载 dlib 并使用 python setup.py install 执行设置但抛出此错误

标签: python python-3.x opencv dlib


【解决方案1】:

您是否使用了带有 python 或 conda 的虚拟环境?

【讨论】:

  • 不,兄弟,我不知道 conda 是什么……我需要那些 conda 才能使用 dlib?
  • 你不需要 Conda,我建议创建一个虚拟环境来安装你项目中需要的所有库
猜你喜欢
  • 2016-11-05
  • 2011-08-16
  • 2019-12-20
  • 2020-02-22
  • 1970-01-01
  • 2017-11-19
  • 2021-02-14
  • 2012-06-05
  • 1970-01-01
相关资源
最近更新 更多