I can not install dlib in python as there is error

75 views Asked by At

I cant install python dlib. I have Cmake installed using the offical Cmake webiste(not pip install) I am also using developer Visual Code 2022 command prompt this is the error


Visual Studio 2022 Developer Command Prompt v17.8.3 Copyright (c) 2022 Microsoft Corporation


C:\Program Files\Microsoft Visual Studio\2022\Community>pip install dlib
Collecting dlib
Using cached dlib-19.24.2.tar.gz (11.8 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
[75 lines of output]
> > > > >       <string>:208: SyntaxWarning: invalid escape sequence '\('
> > > > >       <string>:209: SyntaxWarning: invalid escape sequence '\('
> > > > >       <string>:210: SyntaxWarning: invalid escape sequence '\('
running bdist_wheel
running build
running build_ext
> > > > >       <string>:125: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
Building extension for Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct  2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\User\AppData\Local\Temp\pip-install-bc3z2ght\dlib_077f8fd7320a412a99fbe657b38f7e6e\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\User\AppData\Local\Temp\pip-install-bc3z2ght\dlib_077f8fd7320a412a99fbe657b38f7e6e\build\lib.win32-cpython-312 -DPYTHON_EXECUTABLE=C:\Users\User\AppData\Local\Programs\Python\Python312\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\User\AppData\Local\Temp\pip-install-bc3z2ght\dlib_077f8fd7320a412a99fbe657b38f7e6e\build\lib.win32-cpython-312 -A x64'
Building for: Visual Studio 17 2022
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:14 (project):
No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:14 (project):
No CMAKE_CXX_COMPILER could be found.



Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
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

C:\Program Files\Microsoft Visual Studio\2022\Community>

I tried reinstalling Cmake, it didnt work.I tried using pip install Cmae it didnt work and i uninstalled it. I tried using chatgpt but it also didnt work.There were no youtube videos about it too.

0

There are 0 answers