Cannot install face_recognition using pip install face_recognition on Win10 - python

I get the error
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
╰─> [58 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
Building extension for Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\build\lib.win-amd64-3.10 -DPYTHON_EXECUTABLE=C:\Users\amade\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\build\lib.win-amd64-3.10 -A x64'
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version to target Windows 10.0.19044.
-- 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!
See also "C:/Users/amade/AppData/Local/Temp/pip-install-_k5e982w/dlib_237006073dfd4b13993bf60b7ecb3629/build/temp.win-amd64-3.10/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/amade/AppData/Local/Temp/pip-install-_k5e982w/dlib_237006073dfd4b13993bf60b7ecb3629/build/temp.win-amd64-3.10/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\setup.py", line 222, in <module>
setup(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\command\install.py", line 568, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\amade\\AppData\\Local\\Temp\\pip-install-_k5e982w\\dlib_237006073dfd4b13993bf60b7ecb3629\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\amade\\AppData\\Local\\Temp\\pip-install-_k5e982w\\dlib_237006073dfd4b13993bf60b7ecb3629\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Users\\amade\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\amade\\AppData\\Local\\Temp\\pip-install-_k5e982w\\dlib_237006073dfd4b13993bf60b7ecb3629\\build\\lib.win-amd64-3.10', '-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: 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.

Follow the steps below to install face_recognition python package on Windows 10.
The instruction has been tested on Windows 10 64bit, python 3.9.
Step 1
Download CMake installation package for your OS from official site
Step 2
Install downloaded CMake installation package. Please make sure that Add CMake to system PATH option has been selected during the installation.
Step 3
Reboot your OS (restart computer)
Step 4
Run pip install dlib
It tooks several minutes so be prepared to wait
Step 5
If it completes without any errors, you're all set. Run pip install face_recognition to install face_recognition.
Result

Fixed it. I had to modify my Visual Studio install from Start menu programs, and include latest MSVC and include Windows 10 SDK under Individual Components

Related

cmake instaled but dlib not on pycharm

+++++++++++after i instaled c make +++++++
that shows like:
C:\Users\Medivh>pip install cmake
Collecting cmake
Using cached cmake-3.25.2-py2.py3-none-win_amd64.whl (32.6 MB)
Installing collected packages: cmake
Successfully installed cmake-3.25.2
+++++++++++++i am trying to instal dlib+++++++
C:\Users\Medivh>pip install dlib
Collecting dlib
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Installing collected packages: dlib
DEPRECATION: dlib is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
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
╰─> [72 lines of output]
running install
C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\build\lib.win-amd64-cpython-311 -DPYTHON_EXECUTABLE=C:\Users\Medivh\AppData\Local\Programs\Python\Python311\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\build\lib.win-amd64-cpython-311 -A x64'
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version to target Windows 10.0.19044.
-- 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!
See also "C:/Users/Medivh/AppData/Local/Temp/pip-install-9fdav4gi/dlib_911fc39286d44de494eee64b175fb2f2/build/temp.win-amd64-cpython-311/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Medivh/AppData/Local/Temp/pip-install-9fdav4gi/dlib_911fc39286d44de494eee64b175fb2f2/build/temp.win-amd64-cpython-311/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\setup.py", line 222, in <module>
setup(
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
self.run_command(cmd)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
self.run_command('build')
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\Medivh\AppData\Local\Temp\pip-install-9fdav4gi\dlib_911fc39286d44de494eee64b175fb2f2\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Medivh\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Medivh\\AppData\\Local\\Temp\\pip-install-9fdav4gi\\dlib_911fc39286d44de494eee64b175fb2f2\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Medivh\\AppData\\Local\\Temp\\pip-install-9fdav4gi\\dlib_911fc39286d44de494eee64b175fb2f2\\build\\lib.win-amd64-cpython-311', '-DPYTHON_EXECUTABLE=C:\\Users\\Medivh\\AppData\\Local\\Programs\\Python\\Python311\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Medivh\\AppData\\Local\\Temp\\pip-install-9fdav4gi\\dlib_911fc39286d44de494eee64b175fb2f2\\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: 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 try to install face_recognition but dlib error stand on my way
how i fix this problem
my python versioon is 3.11
and windows 10 64 bit

dlib python not install on a wss

hi i am try to install dlib on a wss using pip but its giving me this error
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
╰─> [44 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
Building extension for Python 3.8.10 (default, Nov 26 2021, 20:14:08)
Invoking CMake setup: 'cmake /tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/build/lib.linux-x86_64-3.8 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Release'
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/setup.py", line 222, in <module>
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/zain/.local/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/setup.py", line 134, in run
self.build_extension(ext)
File "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' 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
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
╰─> [46 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
Building extension for Python 3.8.10 (default, Nov 26 2021, 20:14:08)
Invoking CMake setup: 'cmake /tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/build/lib.linux-x86_64-3.8 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Release'
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/setup.py", line 222, in <module>
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/setup.py", line 134, in run
self.build_extension(ext)
File "/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-6l9ppgj8/dlib_a9ff28b611c041e7822ffaa612e7c30a/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' 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: 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.```
in advance thanks for your help
from
zain

installation error while downloading dlib file

I am trying to download dlib module in python version 3.8.3
My pip version is 22.1
This is the error I got while I was trying to double the dlib module on my system-
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
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
╰─> [61 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
Building extension for Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\user\AppData\Local\Temp\pip-install-7w8dbl2a\dlib_a6e65f9bc04843d0890216847fb50eca\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\user\AppData\Local\Temp\pip-install-7w8dbl2a\dlib_a6e65f9bc04843d0890216847fb50eca\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\users\user\appdata\local\programs\python\python38\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\user\AppData\Local\Temp\pip-install-7w8dbl2a\dlib_a6e65f9bc04843d0890216847fb50eca\build\lib.win-amd64-3.8 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-install-7w8dbl2a\dlib_a6e65f9bc04843d0890216847fb50eca\setup.py", line 222, in <module>
setup(
File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\user\AppData\Local\Temp\pip-install-7w8dbl2a\dlib_a6e65f9bc04843d0890216847fb50eca\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\user\AppData\Local\Temp\pip-install-7w8dbl2a\dlib_a6e65f9bc04843d0890216847fb50eca\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\user\appdata\local\programs\python\python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-7w8dbl2a\\dlib_a6e65f9bc04843d0890216847fb50eca\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-7w8dbl2a\\dlib_a6e65f9bc04843d0890216847fb50eca\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\user\\appdata\\local\\programs\\python\\python38\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-7w8dbl2a\\dlib_a6e65f9bc04843d0890216847fb50eca\\build\\lib.win-amd64-3.8', '-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: legacy-install-failure
The pip version also shows that the error is in installation and not in pip. I didn't include it in the error code because it became too long.
How can I fix this error ?

Error when trying to install autodocking Vina

I'm trying to install Autodock Vina with pip command. But when I run the command pip install -U numpy vina: I get a the following error:
Collecting vina
Using cached vina-1.2.3.tar.gz (95 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
Version found 1.2.3 (from __init__.py)
running egg_info
writing vina.egg-info\PKG-INFO
writing dependency_links to vina.egg-info\dependency_links.txt
writing requirements to vina.egg-info\requires.txt
writing top-level names to vina.egg-info\top_level.txt
Boost library is not installed in this conda environment.
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 346, in <module>
setup(
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 299, in run
self.find_sources()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
mm.run()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 541, in run
self.add_defaults()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 578, in add_defaults
sdist.add_defaults(self)
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Users\Familia\AppData\Local\Temp\pip-build-env-km4q58s5\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "setup.py", line 247, in finalize_options
raise ValueError(error_msg)
ValueError: Boost library location was not found!
Directories searched: conda env, /usr/local/include and /usr/include.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I have had a similar issue and fixed it by installing boost and swig libraries. Unfortunately, I do not completely know how to do that on Windows, but the rough sketch of what you should do is:
Locate your active conda environment. If there are none, create and activate one before installing your project dependencies. To get to know the location of your environment, use conda info. For more, see this stackoverflow thread.
Download boost and swig as archives from these links to their official website.
Unpack the archives into the conda environment folder.
Try installing again (make sure you have activated the environment) pip install -U numpy vina.
For the Linux and MacOS users that may have the same issue, the solution is very similar, except that you do not have to activate a conda environment. Instead, you can install boost and swig globally in your system, as described in this guide in the autodock-vina website.
Install C++ compiler.
Ubuntu/Debian: sudo apt-get install build-essentials
macOS: Install Xcode from the AppStore and the Command Line Tools (CLT) from the terminal xcode-select --install
Install boost and swig in your system
Ubuntu/Debian: sudo apt-get install libboost-all-dev swig
macOS (with Homebrew): brew install boost swig

Given below is error while installing dlib in python 3.6.6. I am using command "python setup.py install" inside dlib 19.15 folder in windows 10.

Given below is the error. Please help. An error occured while installation. I am using dlib ver 19.15 . I think cmake is not configured properly. Can u guys check and tell where is the error? I am using cmake version 3.12 . I am using python 3.6.6 and pip version 10 (not latest). I am using windows 10 core i5. I am frustrated.
running install
running bdist_egg
running egg_info
writing dlib.egg-info\PKG-INFO
writing dependency_links to dlib.egg-info\dependency_links.txt
writing top-level names to dlib.egg-info\top_level.txt
package init file 'dlib\__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\HP\AppData\Local\Programs\Python\Python36\Lib\site-packages\dlib-19.15\tools\python - DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HP\AppData\Local\Programs\Python\Python36\Lib\site-packages\dlib-19.15\build\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=C:\Users\HP\AppData\Local\Programs\Python\Python36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HP\AppData\Local\Programs\Python\Python36\Lib\site-packages\dlib-19.15\build\lib.win-amd64-3.6 -A x64'
CMake Error in CMakeLists.txt:
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/HP/AppData/Local/Programs/Python/Python36/Lib/site- packages/dlib-19.15/build/temp.win-amd64-3.6/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 257, in <module>
'Topic :: Software Development',
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 133, in run
self.build_extension(ext)
File "setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages\\dlib-19.15\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages\\dlib-19.15\\build\\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python36\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages\\dlib-19.15\\build\\lib.win-amd64-3.6', '-A', 'x64']' returned non-zero exit status 1.
It is fixed now. I only had to install Visual Studio as cmake requires it for .cxx files compilation.

Categories