When trying to install the dlib library using pip, I’m getting the following error:
> 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 ╰─> [11 lines of output]
>
> running bdist_wheel
>
> running build
>
> running build_ext
>
> Traceback (most recent call last):
> File "<frozen runpy>", line 198, in _run_module_as_main
> File "<frozen runpy>", line 88, in _run_code
> File "C:UsersSUSIL KUMARDesktopFace-Recognition-ApplicationvenvScriptscmake.exe__main__.py",
> line 4, in <module>
> 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
The error message clearly states that “CMake must be installed to build dlib”. However, I installed cmake from cmake
However, I have not found any information on how to resolve this issue.
Can someone please help me resolve this error and successfully install the dlib library?