dlib: Building wheel for dlib (setup.py) ... error
Hello i’m trying to install dlib using pip install dlibbut i get an error.
This is the error:
G:\Gedeelde drives\4TW_2022-2023_T1(Lucas-Bram-Senne)\2. Persoonlijk\2. Lucas N\Test gezichtsherkenning\Test>pip install dlib
Collecting dlib
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
running bdist_wheel
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
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
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
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: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
i’am using python 3.8.2
I got dlib automaticly using pip install dlib
i’am using windows 10 64 bit
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (5 by maintainers)
I used this tuturial. https://medium.com/analytics-vidhya/how-to-install-dlib-library-for-python-in-windows-10-57348ba1117f I forgot to install visual studio.
i tried this conda install -c conda-forge dlib and it worked
My solution for this problem was: 1 Download the dlib zip from https://pypi.org/project/dlib/#files 2 Extract and cd into the folder with powershell(running as admin) 3 Execute python setup.py install Done
You can do the following:
The solution does not belong to me. Source: https://www.youtube.com/watch?v=BUu6hrcYI_c
I hope that solves your problem
You are using Visual Studio 16 2019. v16 is old. Try at least v17.
Hello i’m trying to install dlib using pip install dlibbut i get an error,I found that it’s impossible to install it. There is no working solution on the internet
This is the error: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 ╰─> [179 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 | packaged by Anaconda, Inc. | (main, Jul 5 2023, 13:38:37) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: ‘cmake C:\Users\Admin\AppData\Local\Temp\pip-install-i2hv9wmd\dlib_f9295363cbb04261a954619 7b7d35461\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Admin\AppData\Local\Temp\pip-install-i2hv9wmd\dlib_f9 295363cbb04261a9546197b7d35461\build\lib.win-amd64-cpython-311 -DPYTHON_EXECUTABLE=F:\Anaconda\python.exe -DCMAKE_LIBR ARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Admin\AppData\Local\Temp\pip-install-i2hv9wmd\dlib_f9295363cbb04261a9546197b7d35461\build\lib.win-amd64-cpython-311 -A x64’ – Building for: Visual Studio 17 2022 – Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631. – The C compiler identification is MSVC 19.38.33133.0 – The CXX compiler identification is MSVC 19.38.33133.0 – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Check for working C compiler: G:/VisualStudio/community2023/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped – Detecting C compile features – Detecting C compile features - done – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Check for working CXX compiler: G:/VisualStudio/community2023/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped – Detecting CXX compile features – Detecting CXX compile features - done CMake Deprecation Warning at C:/Users/Admin/AppData/Local/Temp/pip-install-i2hv9wmd/dlib_f9295363cbb04261a9546197b7d35461/dlib/external/pybind11/CMakeLists.txt:8 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.
录或输出目录无法驻留在临时目录下,因为这可能会导致增量生成出现问题。 [C:\Users\Admin\AppData\Local\Temp\pip-install- -i2hv9wmd\dlib_f9295363cbb04261a9546197b7d35461\build\temp.win-amd64-cpython-311\Release\ZERO_CHECK.vcxproj] 1>Checking Build System G:\VisualStudio\community2023\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: 中间 录或输出目录无法驻留在临时目录下,因为这可能会导致增量生成出现问题。 [C:\Users\Admin\AppData\Local\Temp\pip-install- -i2hv9wmd\dlib_f9295363cbb04261a9546197b7d35461\build\temp.win-amd64-cpython-311\Release\dlib_build\dlib.vcxproj]
Building Custom Rule C:/Users/Admin/AppData/Local/Temp/pip-install-i2hv9wmd/dlib_f9295363cbb04261a9546197b7d35461/dlib/CMakeLists.txt base64_kernel_1.cpp bigint_kernel_1.cpp bigint_kernel_2.cpp bit_stream_kernel_1.cpp entropy_decoder_kernel_1.cpp entropy_decoder_kernel_2.cpp entropy_encoder_kernel_1.cpp entropy_encoder_kernel_2.cpp md5_kernel_1.cpp tokenizer_kernel_1.cpp unicode.cpp test_for_odr_violations.cpp fft.cpp sockets_kernel_1.cpp bsp.cpp dir_nav_kernel_1.cpp dir_nav_kernel_2.cpp dir_nav_extensions.cpp fonts.cpp linker_kernel_1.cpp extra_logger_headers.cpp logger_kernel_1.cpp logger_config_file.cpp misc_api_kernel_1.cpp misc_api_kernel_2.cpp sockets_extensions.cpp sockets_kernel_2.cpp sockstreambuf.cpp sockstreambuf_unbuffered.cpp server_kernel.cpp server_iostream.cpp server_http.cpp multithreaded_object_extension.cpp threaded_object_extension.cpp threads_kernel_1.cpp
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
It will finish.
On Thu, May 11, 2023 at 11:21 PM tanmaymishra1551 @.***> wrote:
I installed cmake from the site and slect add to path. If i type cmake in cmd i works.