【问题标题】:ERROR: dlib-19.8.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform错误:dlib-19.8.1-cp36-cp36m-win_amd64.whl 不是此平台支持的轮子
【发布时间】:2019-12-28 01:16:58
【问题描述】:

下载dlib模块时,终端输出返回错误:

CMakeLists.txt 中的 CMake 错误: CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

【问题讨论】:

  • 你试试它的建议吗:要解决这个问题,从 Visual Studio 命令提示符运行 cmake

标签: python visual-studio opencv face-recognition dlib


【解决方案1】:

通过尝试以下解决方案解决了问题

  1. 尝试使用 Wheel 文件安装 即使由于平台不支持而失败,请尝试以下选项

  2. 尝试从https://pypi.org/project/dlib/#files 安装源文件,然后通过将文件放入站点包文件夹来运行 pip setup.py install。 如果它在 numpy 中显示任何 ssize_t 变量问题,请在文件顶部声明一个局部变量 ssize

【讨论】:

    【解决方案2】:

    好的。我安装dlib 有一段时间了。我知道现在不该做什么。 你唯一需要的就是这个。 按照步骤。这就对了。原来pythons最新版本不支持dlib。所以你必须安装一个python wheel,它很容易通过你的cmd上的pip install wheel命令安装。然后下载提到的文件后[按照下面git配置文件中提到的步骤,你会很好。]

    单独安装所有东西会有点压力。下面的链接运行一个安装程序来安装dlib 包。它会询问您的用户运行权限并被 Windows Defender 阻止,但按更多并单击“仍然运行”。 不要忘记测试您的软件包安装!

    https://github.com/shashankx86/dlib_compiled

    【讨论】:

      【解决方案3】:

      在 ubuntu 或 mac os 平台上查看此链接https://www.pyimagesearch.com/2018/01/22/install-dlib-easy-complete-guide/安装

      如果您将 dlib 用于 face_recognition 模型,则另一种类型的安装方法请遵循此答案

      (python 3.6 到 3.7.0 正常工作)。

      首先创建环境,conda create -n env_name python=version

      然后激活,conda activate env_name

      现在通过 conda forge 频道安装,conda install -c conda-forge dlib=19.17

      【讨论】:

      • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接答案可能会失效。 - From Review
      • 请在降级之前检查答案的完整详细信息
      • 我没有否决您的回答。我在评论中遇到它,并发表了评论。仅链接的答案被认为是低质量的,因为指向外部资源的链接在经过一段时间后往往会导致无效,并且资源变得不可用
      • 我会在此提醒。感谢您的支持
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-01
      • 2020-04-05
      • 2020-08-04
      • 2020-10-17
      • 2017-09-20
      • 2019-10-22
      • 2020-07-18
      相关资源
      最近更新 更多