I am trying to install face_recognition into my project and thus I am running the command ‘pip install face_recognition’ in the terminal, but I am having this error(I have installed cmake):
in short : ERROR : Could not build wheels for dlib, which is required to install pyproject.toml-based projects
Whole Error :
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
╰─> [314 lines of output]
running bdist_wheel
running build
running build_ext
Building extension for Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: ‘cmake C:UsersShashwatAppDataLocalTemppip-install-gem29hzldlib_bd69ef4fa75e4a58a152da24ab42b4d5toolspython -DCMAKE_LIBR
ARY_OUTPUT_DIRECTORY=C:UsersShashwatAppDataLocalTemppip-install-gem29hzldlib_bd69ef4fa75e4a58a152da24ab42b4d5buildlib.win-amd64-cpython-38 -DPYTHON
_EXECUTABLE=C:ProgramDataAnaconda3python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersShashwatAppDataLocalTemppip-install-gem29hzldlib_bd69
ef4fa75e4a58a152da24ab42b4d5buildlib.win-amd64-cpython-38 -A x64’
— Building for: Visual Studio 17 2022
— Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
— The C compiler identification is MSVC 19.36.32534.0
— The CXX compiler identification is MSVC 19.36.32534.0
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe – skipped
— Detecting CXX compile features
— Detecting CXX compile features – done
— pybind11 v2.10.0
— Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.6")
— Found PythonLibs: C:/ProgramData/Anaconda3/libs/python38.lib
— Performing Test HAS_MSVC_GL_LTCG
— Performing Test HAS_MSVC_GL_LTCG – Success
— Using CMake version: 3.26.4
— Compiling dlib version: 19.24.2
— Looking for sys/types.h
— Looking for sys/types.h – found
— Looking for stdint.h
— Looking for stdint.h – found
— Looking for stddef.h
— Looking for stddef.h – found
— Check size of void*
— Check size of void* – done
— Enabling SSE2 instructions
— Searching for BLAS and LAPACK
— Searching for BLAS and LAPACK
— Performing Test CMAKE_HAVE_LIBC_PTHREAD
— Performing Test CMAKE_HAVE_LIBC_PTHREAD – Failed
— Looking for pthread_create in pthreads
— Looking for pthread_create in pthreads – not found
— Looking for pthread_create in pthread
— Looking for pthread_create in pthread – not found
— Found Threads: TRUE
CUDA_TOOLKIT_ROOT_DIR not found or specified
— Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5"
)
— Found CUDA, but CMake was unable to find the cuBLAS libraries that should be part of every basic CUDA install. Your CUDA install is somehow broken
or incomplete. Since cuBLAS is required for dlib to use CUDA we won’t use CUDA.
— DID NOT FIND CUDA
— Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA
— Searching for FFMPEG/LIBAV
— Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
— PkgConfig could not be found, FFMPEG won’t be available
— Configuring done (80.0s)
— Generating done (0.1s)
— Build files have been written to: C:/Users/Shashwat/AppData/Local/Temp/pip-install-gem29hzl/dlib_bd69ef4fa75e4a58a152da24ab42b4d5/build/temp.win-am
d64-cpython-38/Release
Invoking CMake build: ‘cmake –build . –config Release — /m’
MSBuild version 17.6.3+07e294721 for .NET Framework
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 tried installing cmake and dlib. Cmake installed successfully but dlib is giving similar error. I want a resolution of this problem. I am working on PyCharm.
2
Answers
I think you can reference this installation instruction dlib installation
or may be you can refer dlib github
I don’t install the visual studio and the remain of disks is little.
Try this options