0% found this document useful (0 votes)
87 views3 pages

dlib Installation Error on Windows

The document is a log from an error encountered while installing the dlib library for use with face recognition in Python. The key points are: 1) An error occurred during the build wheel process for dlib, with the subprocess exiting with a non-zero code. 2) The error message indicates that dlib requires Visual Studio to build its Python extension on Windows, and the developer does not have Visual Studio with C++ support installed. 3) Without the proper version of Visual Studio, dlib cannot be built and installed, causing the overall installation from the pyproject.toml file to fail.

Uploaded by

esmore6682
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views3 pages

dlib Installation Error on Windows

The document is a log from an error encountered while installing the dlib library for use with face recognition in Python. The key points are: 1) An error occurred during the build wheel process for dlib, with the subprocess exiting with a non-zero code. 2) The error message indicates that dlib requires Visual Studio to build its Python extension on Windows, and the developer does not have Visual Studio with C++ support installed. 3) Without the proper version of Visual Studio, dlib cannot be built and installed, causing the overall installation from the pyproject.toml file to fail.

Uploaded by

esmore6682
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

‫ آقایان کسی نمیدونه چرا موقع نصب الیبرری‬face_recognition ‫این ارورو میده‬:

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
╰─> [78 lines of output]
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.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023,
05:45:37) [MSC v.1934 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Arman Center\AppData\Local\Temp\pip-
install-lioj5ybn\dlib_24872a52e9eb43f497174e2f35fead08\tools\python -
DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Arman Center\AppData\Local\Temp\pip-
install-lioj5ybn\dlib_24872a52e9eb43f497174e2f35fead08\build\lib.win-amd64-cpython-
311 -DPYTHON_EXECUTABLE=C:\Users\Arman Center\AppData\Local\Programs\Python\
Python311\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Arman
Center\AppData\Local\Temp\pip-install-lioj5ybn\
dlib_24872a52e9eb43f497174e2f35fead08\build\lib.win-amd64-cpython-311 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!

You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!

-- Configuring incomplete, errors occurred!


Traceback (most recent call last):
File "C:\Users\Arman Center\AppData\Local\Programs\Python\Python311\Lib\
site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in
<module>
main()
File "C:\Users\Arman Center\AppData\Local\Programs\Python\Python311\Lib\
site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in
main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Arman Center\AppData\Local\Programs\Python\Python311\Lib\
site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in
build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\build_meta.py", line 419, in
_build_with_temp_dir
self.run_setup()
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 218, in <module>
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
super().run_command(command)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\wheel\bdist_wheel.py", line 364, in run
self.run_command("build")
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
super().run_command(command)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
super().run_command(command)
File "C:\Users\Arman Center\AppData\Local\Temp\pip-build-env-hovm13k2\
overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 130, in run
File "<string>", line 167, in build_extension
File "C:\Users\Arman Center\AppData\Local\Programs\Python\Python311\Lib\
subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Arman Center\\
AppData\\Local\\Temp\\pip-install-lioj5ybn\\dlib_24872a52e9eb43f497174e2f35fead08\\
tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Arman Center\\
AppData\\Local\\Temp\\pip-install-lioj5ybn\\dlib_24872a52e9eb43f497174e2f35fead08\\
build\\lib.win-amd64-cpython-311', '-DPYTHON_EXECUTABLE=C:\\Users\\Arman Center\\
AppData\\Local\\Programs\\Python\\Python311\\python.exe', '-
DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Arman Center\\AppData\\Local\\
Temp\\pip-install-lioj5ybn\\dlib_24872a52e9eb43f497174e2f35fead08\\build\\lib.win-
amd64-cpython-311', '-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

You might also like