I am trying to install face_recognition package but it still shoots an error.
I have installed cmake and tried doing it again but it still does not work:
!pip install cmake
!pip install face_recognition
The installation works. But when I import face_recognition it says module not found.
Collecting face_recognition
Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Requirement already satisfied: numpy in c:\users\pratyush\anaconda2\lib\site-packages (from face_recognition) (1.16.2)
Requirement already satisfied: Click>=6.0 in c:\users\pratyush\anaconda2\lib\site-packages (from face_recognition) (7.0)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\pratyush\anaconda2\lib\site-packages (from face_recognition) (0.3.0)
Collecting dlib>=19.7 (from face_recognition)
Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Requirement already satisfied: Pillow in c:\users\pratyush\anaconda2\lib\site-packages (from face_recognition) (5.4.1)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py): started
Building wheel for dlib (setup.py): finished with status 'error'
Complete output from command C:\Users\Pratyush\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d c:\users\pratyush\appdata\local\temp\pip-wheel-qxe9rn --python-tag cp27:
running bdist_wheel
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 2.7.16 |Anaconda, Inc.| (default, Mar 14 2019, 15:42:17) [MSC v.1500 64 bit (AMD64)]
Invoking CMake setup: 'cmake c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\build\lib.win-amd64-2.7 -DPYTHON_EXECUTABLE=C:\Users\Pratyush\Anaconda2\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\build\lib.win-amd64-2.7 -A x64'
-- Building for: NMake Makefiles
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/Pratyush/AppData/Local/Temp/pip-install-oeubb_/dlib/build/temp.win-amd64-2.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py", line 261, in
'Topic :: Software Development',
File "C:\Users\Pratyush\Anaconda2\lib\site-packages\setuptools__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Pratyush\Anaconda2\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "C:\Users\Pratyush\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Pratyush\Anaconda2\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Pratyush\Anaconda2\lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\build\lib.win-amd64-2.7', '-DPYTHON_EXECUTABLE=C:\Users\Pratyush\Anaconda2\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\build\lib.win-amd64-2.7', '-A', 'x64']' returned non-zero exit status 1
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command C:\Users\Pratyush\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\pratyush\appdata\local\temp\pip-record-mm4zcw\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 2.7.16 |Anaconda, Inc.| (default, Mar 14 2019, 15:42:17) [MSC v.1500 64 bit (AMD64)]
Invoking CMake setup: 'cmake c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\build\lib.win-amd64-2.7 -DPYTHON_EXECUTABLE=C:\Users\Pratyush\Anaconda2\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\build\lib.win-amd64-2.7 -A x64'
-- Building for: NMake Makefiles
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/Pratyush/AppData/Local/Temp/pip-install-oeubb_/dlib/build/temp.win-amd64-2.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\Users\Pratyush\Anaconda2\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Pratyush\Anaconda2\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Users\Pratyush\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Pratyush\Anaconda2\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\Pratyush\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "c:\users\pratyush\appdata\local\temp\pip-install-oeubb_\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Pratyush\Anaconda2\lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\\users\\pratyush\\appdata\\local\\temp\\pip-install-oeubb_\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\\users\\pratyush\\appdata\\local\\temp\\pip-install-oeubb_\\dlib\\build\\lib.win-amd64-2.7', '-DPYTHON_EXECUTABLE=C:\\Users\\Pratyush\\Anaconda2\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\\users\\pratyush\\appdata\\local\\temp\\pip-install-oeubb_\\dlib\\build\\lib.win-amd64-2.7', '-A', 'x64']' returned non-zero exit status 1
THE ERROR MESSAGE
Related
+++++++++++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
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
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 ?
I have installed Python 3.7.8. in my machine. When I tried to install python face_recognition library I got some errors which telling that need to install cmake and visual c++. Then I installed cmake and visual c++ 2015-2019. But I still get the following errors when I try to install.
Please help me to solve this.
C:\Users\prasa>pip3 install face_recognition
Collecting face_recognition
Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages (from face_recognition) (0.3.0)
Requirement already satisfied numpy in c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages (from face_recognition) (1.18.5)
Requirement already satisfied: Pillow in c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages (from face_recognition) (7.2.0)
Requirement already satisfied: Click>=6.0 in c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages (from face_recognition) (7.1.2)
Collecting dlib>=19.7
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\prasa\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\prasa\AppData\Local\Temp\pip-wheel-y5alb_6d'
cwd: C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\
Complete output (58 lines):
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.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=c:\users\prasa\appdata\local\programs\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\build\lib.win-amd64-3.7 -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 "<string>", line 1, in <module>
File "C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\setup.py", line 262, in <module>
'Topic :: Software Development',
File "c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\prasa\\appdata\\local\\programs\\python\\python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\prasa\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\prasa\AppData\Local\Temp\pip-record-h34wkq_s\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\prasa\appdata\local\programs\python\python37\Include\dlib'
cwd: C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\
Complete output (60 lines):
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.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=c:\users\prasa\appdata\local\programs\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\build\lib.win-amd64-3.7 -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 "<string>", line 1, in <module>
File "C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\setup.py", line 262, in <module>
'Topic :: Software Development',
File "c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\prasa\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\prasa\AppData\Local\Temp\pip-install-08cdgdia\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\prasa\appdata\local\programs\python\python37\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\prasa\\appdata\\local\\programs\\python\\python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\prasa\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\prasa\\AppData\\Local\\Temp\\pip-install-08cdgdia\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\prasa\AppData\Local\Temp\pip-record-h34wkq_s\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\prasa\appdata\local\programs\python\python37\Include\dlib' Check the logs for full command output.
How I can install dlib. I tried to install dlib in many way but it's alway error.
Got an error:
ERROR: Complete output from command 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\hommy\AppData\Local\Temp\pip-wheel-5e3dfpnu' --python-tag cp37:
ERROR: running bdist_wheel
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\build\lib.win-amd64-3.7 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:3 (project):
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/hommy/AppData/Local/Temp/pip-install-c_rc8wfx/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\ProgramData\\Anaconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
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: Complete output from command 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\hommy\AppData\Local\Temp\pip-record-ik12xcpk\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\build\lib.win-amd64-3.7 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:3 (project):
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/hommy/AppData/Local/Temp/pip-install-c_rc8wfx/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\ProgramData\Anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\ProgramData\\Anaconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command "'C:\ProgramData\Anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\hommy\\AppData\\Local\\Temp\\pip-install-c_rc8wfx\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\hommy\AppData\Local\Temp\pip-record-ik12xcpk\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\hommy\AppData\Local\Temp\pip-install-c_rc8wfx\dlib\
Anaconda is available from, https://www.anaconda.com/distribution/#download-section
conda instruction are, https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf
Dlib is support with python 3.6 to 3.7.0 version s.Try to install the dlib in anaconda prompt by following command.,
step 1:
conda create -n env_name python=3.7.0
step 2:
conda activate env_name
step 3:
conda install -c conda-forge dlib=19.17
-c is stands for channel, conda-forge is one of channels.
you can find all supported packages for conda's in this link https://repo.anaconda.com/pkgs/main/win-64/