C:\Users\moham>pip install cmake
Requirement already satisfied: cmake in c:\users\moham\appdata\local\programs\python\python312\lib\site-packages (3.29.2)
C:\Users\moham>pip install dlib
Collecting dlib
Using cached dlib-19.24.4.tar.gz (3.3 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
╰─> [14 lines of output]
:210: SyntaxWarning: invalid escape sequence ‘(’
:211: SyntaxWarning: invalid escape sequence ‘(’
:212: SyntaxWarning: invalid escape sequence ‘(’
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in run_code
File "C:\Users\moham\AppData\Local\Programs\Python\Python312\Scripts\cmake.exe_main.py", line 4, in
ModuleNotFoundError: No module named ‘cmake’
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