在 Windows 11 Python 3.10.7 上安装 dlib

问题描述 投票:0回答:1

我正在尝试使用 Python 版本 3.10.7. 在 Windows 11 上安装 dlib。

运行

pip install dlib
后出现如下错误:

Collecting dlib
  Using cached dlib-19.24.1.tar.gz (3.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dlib
  Building wheel for dlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for dlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext

      ERROR: CMake must be installed to build dlib

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects

我知道有一种使用 cmake 安装 dlib 的特定方法,但我不知道如何下载它,因为我看过的所有地方都提供了适用于 Windows 10 的解决方案。如果有人有解决方案或知道使用我的特定下载 dlib 的方法要求请告诉我!


python pip dlib windows-11
1个回答
0
投票

https://cmake.org/download/

下载 CMake

安装后,将其添加到系统路径(环境变量>路径>单击新建并在那里添加路径>单击确定保存)

再次尝试

pip install dlib

© www.soinside.com 2019 - 2024. All rights reserved.