I have a problem pip installing the dlib library

56 views Asked by At

While attempting to pip install dlib, I get the following error:

raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', 'C:\Users\MUHAMMAD USMAN\AppData\Local\Temp\pip-install-8lhbgb6j\dlib_38bf52dcd86d47d4bfa0708f58a51173\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\MUHAMMAD USMAN\AppData\Local\Temp\pip-install-8lhbgb6j\dlib_38bf52dcd86d47d4bfa0708f58a51173\build\lib.win-amd64-cpython-312', '-DPYTHON_EXECUTABLE=C:\Users\MUHAMMAD USMAN\AppData\Local\Programs\Python\Python312\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\MUHAMMAD USMAN\AppData\Local\Temp\pip-install-8lhbgb6j\dlib_38bf52dcd86d47d4bfa0708f58a51173\build\lib.win-amd64-cpython-312', '-A', 'x64']' returned non-zero exit status 1. [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

I would like help understanding the issue with the installation.

1

There are 1 answers

0
Bohdan On

Did you try something like THIS ? This installation needs some preconditions, so, generally:

  1. Install CMake
  2. Install visual studio
  3. Install cmake module
  4. Install dlib library.