Visual studio 2015 is not installed
I have installed all the requirements before building dlib in python:
Cmake
python 3.6 and other bindings.
while installing dlib using pip:
pip install dlib
Got an error:
Collecting dlib
Using cached https://files.pythonhosted.org/packages/df/aa/6a9bb2a763107bb2606d6ee1aa65fcd3b51375a9ef6436e9c9280b0dd63c/dlib-19.15.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command "c:usersvikas tiwarianaconda3python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:UsersVIKAST~1AppDataLocalTemppip-wheel-nnayeybw --python-tag cp36:
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.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibtoolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibbuildlib.win-amd64-3.6 -DPYTHON_EXECUTABLE=c:usersvikas tiwarianaconda3python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibbuildlib.win-amd64-3.6 -A x64'
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error in CMakeLists.txt:
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 8/7/2018 1:07:47 PM.
Project "C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj" on node 1 (default targets).
C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj" (default target) (1) ->
C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.03
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Vikas Tiwari/AppData/Local/Temp/pip-install-4f4b8868/dlib/build/temp.win-amd64-3.6/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibsetup.py", line 257, in <module>
'Topic :: Software Development',
File "c:usersvikas tiwarianaconda3libsite-packagessetuptools__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "c:usersvikas tiwarianaconda3libdistutilscore.py", line 148, in setup
dist.run_commands()
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 955, in run_commands
self.run_command(cmd)
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "c:usersvikas tiwarianaconda3libsite-packageswheelbdist_wheel.py", line 202, in run
self.run_command('build')
File "c:usersvikas tiwarianaconda3libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "c:usersvikas tiwarianaconda3libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "c:usersvikas tiwarianaconda3libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibsetup.py", line 133, in run
self.build_extension(ext)
File "C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibsetup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:usersvikas tiwarianaconda3libsubprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\build\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=c:\users\vikas tiwari\anaconda3\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\build\lib.win-amd64-3.6', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
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
Complete output from command "c:usersvikas tiwarianaconda3python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersVIKAST~1AppDataLocalTemppip-record-aol24hccinstall-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 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibtoolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibbuildlib.win-amd64-3.6 -DPYTHON_EXECUTABLE=c:usersvikas tiwarianaconda3python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibbuildlib.win-amd64-3.6 -A x64'
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error in CMakeLists.txt:
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 8/7/2018 1:07:50 PM.
Project "C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj" on node 1 (default targets).
C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj" (default target) (1) ->
C:UsersVikas TiwariAppDataLocalTemppip-install-4f4b8868dlibbuildtemp.win-amd64-3.6ReleaseCMakeFiles3.12.0VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.03
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Vikas Tiwari/AppData/Local/Temp/pip-install-4f4b8868/dlib/build/temp.win-amd64-3.6/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibsetup.py", line 257, in <module>
'Topic :: Software Development',
File "c:usersvikas tiwarianaconda3libsite-packagessetuptools__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "c:usersvikas tiwarianaconda3libdistutilscore.py", line 148, in setup
dist.run_commands()
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 955, in run_commands
self.run_command(cmd)
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "c:usersvikas tiwarianaconda3libsite-packagessetuptoolscommandinstall.py", line 61, in run
return orig.install.run(self)
File "c:usersvikas tiwarianaconda3libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "c:usersvikas tiwarianaconda3libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "c:usersvikas tiwarianaconda3libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "c:usersvikas tiwarianaconda3libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:usersvikas tiwarianaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibsetup.py", line 133, in run
self.build_extension(ext)
File "C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlibsetup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:usersvikas tiwarianaconda3libsubprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\build\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=c:\users\vikas tiwari\anaconda3\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\build\lib.win-amd64-3.6', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
Command ""c:usersvikas tiwarianaconda3python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\VIKAST~1\AppData\Local\Temp\pip-install-4f4b8868\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersVIKAST~1AppDataLocalTemppip-record-aol24hccinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersVIKAST~1AppDataLocalTemppip-install-4f4b8868dlib
I really don’t have any idea what’s the real issue here. Do i have to install Visual Studio to compile c++ files of dlib ?
Don’t have VS 2015 installed right now!!
Hello i’m trying to install dlib using pip install dlib
but i get an error.
G:Gedeelde drives4TW_2022-2023_T1(Lucas-Bram-Senne)2. Persoonlijk2. Lucas NTest gezichtsherkenningTest>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 'toolspythondlib__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 'toolspythondlib__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
I am trying to install dlib on Pycharm (which is similar to Anaconda) in order to use it for my Python and OpenCV face detection project.
I have installed cMake and upgraded Python but there is still an error:
Command
pip install dlib
Error
FileNotFoundError: [WinError 2] The system cannot find the file specified
Command output
Collecting dlib
Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command C:UsersmehrsPycharmProjectsproject2venvScriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\mehrs\AppData\Local\Temp\pycharm-packaging\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersmehrsAppDataLocalTemppip-record-_nvwlk_iinstall-record.txt --single-version-externally-managed --compile --install-headers C:UsersmehrsPycharmProjectsproject2venvincludesitepython3.7dlib:
running install
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Traceback (most recent call last):
File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 395, in check_output
**kwargs).stdout
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 261, in <module>
'Topic :: Software Development',
File "C:UsersmehrsPycharmProjectsproject2venvlibsite-packagessetuptools-39.1.0-py3.7.eggsetuptools__init__.py", line 129, in setup
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersmehrsPycharmProjectsproject2venvlibsite-packagessetuptools-39.1.0-py3.7.eggsetuptoolscommandinstall.py", line 61, in run
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 125, in get_cmake_version
"n*******************************************************************n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
Command "C:UsersmehrsPycharmProjectsproject2venvScriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\mehrs\AppData\Local\Temp\pycharm-packaging\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersmehrsAppDataLocalTemppip-record-_nvwlk_iinstall-record.txt --single-version-externally-managed --compile --install-headers C:UsersmehrsPycharmProjectsproject2venvincludesitepython3.7dlib" failed with error code 1 in C:UsersmehrsAppDataLocalTemppycharm-packagingdlib
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Error in python3 PIP install Dlib:
Dlib has been installed before. It takes a long time. When you re install it, you forget some necessary conditions. This time, please make a note.
The error information is as follows:
Collecting dlib
Downloading https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz (3.4MB)
|████████████████████████████████| 3.4MB 14kB/s
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Complete output from command 'f:python36python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersfuAppDataLocalTemppip-wheel-g2i4oztb' --python-tag cp36:
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
Traceback (most recent call last):
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "f:python36libsubprocess.py", line 356, in check_output
**kwargs).stdout
File "f:python36libsubprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "f:python36libsubprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "f:python36libsubprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the specified file.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 261, in <module>
'Topic :: Software Development',
File "f:python36libsite-packagessetuptools__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "f:python36libdistutilscore.py", line 148, in setup
dist.run_commands()
File "f:python36libdistutilsdist.py", line 955, in run_commands
self.run_command(cmd)
File "f:python36libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "f:python36libsite-packageswheelbdist_wheel.py", line 192, in run
self.run_command('build')
File "f:python36libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:python36libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "f:python36libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "f:python36libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:python36libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 125, in get_cmake_version
"n*******************************************************************n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
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 'f:python36python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersfuAppDataLocalTemppip-record-4kwg7hfvinstall-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
Traceback (most recent call last):
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "f:python36libsubprocess.py", line 356, in check_output
**kwargs).stdout
File "f:python36libsubprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "f:python36libsubprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "f:python36libsubprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the specified file.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 261, in <module>
'Topic :: Software Development',
File "f:python36libsite-packagessetuptools__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "f:python36libdistutilscore.py", line 148, in setup
dist.run_commands()
File "f:python36libdistutilsdist.py", line 955, in run_commands
self.run_command(cmd)
File "f:python36libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "f:python36libsite-packagessetuptoolscommandinstall.py", line 61, in run
return orig.install.run(self)
File "f:python36libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "f:python36libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:python36libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "f:python36libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "f:python36libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:python36libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:UsersfuAppDataLocalTemppip-install-t50q34ymdlibsetup.py", line 125, in get_cmake_version
"n*******************************************************************n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command "'f:python36python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersfuAppDataLocalTemppip-record-4kwg7hfvinstall-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:UsersfuAppDataLocalTemppip-install-t50q34ymdlib
WARNING: You are using pip version 19.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Cmake and boost need to be installed before Dlib is installed. Then Dlib can be installed correctly
pip install boost
pip install cmake
pip install dib
Test installation results:
C:Usersfu>python
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
>>>
psychologist 2 / 2 / 0 Регистрация: 01.01.2010 Сообщений: 189 |
||||
1 |
||||
27.03.2019, 22:46. Показов 9182. Ответов 6 Метки нет (Все метки)
я пытаюсь установить пакет face_recognition pip install face_recognition выходит ошибка
C:Windowssystem32> уже гуглил в инете не помогло.
__________________
0 |
114 / 22 / 3 Регистрация: 11.09.2017 Сообщений: 141 Записей в блоге: 4 |
|
28.03.2019, 08:51 |
2 |
psychologist, как вариант, причина может быть такая (Windows not officially supported, but might work), если конечно Вы читали документацию.
0 |
2 / 2 / 0 Регистрация: 01.01.2010 Сообщений: 189 |
|
28.03.2019, 13:21 [ТС] |
3 |
tabbols95, да я читал на гитхабе, и что теперь, получается кому как повезет? у кого-то библиотека встанет ,а у кого-то нет? )
0 |
1283 / 668 / 365 Регистрация: 07.01.2019 Сообщений: 2,176 |
|
28.03.2019, 14:01 |
4 |
psychologist, попробуйте установить Visual Studio 2017Community Edition
0 |
0 / 0 / 3 Регистрация: 23.06.2018 Сообщений: 40 |
|
02.08.2020, 10:01 |
5 |
pip install —no-dependencies face_recognition
0 |
1797 / 812 / 111 Регистрация: 29.01.2013 Сообщений: 4,861 |
|
02.08.2020, 10:19 |
6 |
И очень сильно старайтесь, что бы в путях небыло кириллицы. Ну не любят её авторы большинства приложений, не любят!
0 |
Garry Galler 5403 / 3827 / 1214 Регистрация: 28.10.2013 Сообщений: 9,554 Записей в блоге: 1 |
||||
02.08.2020, 16:55 |
7 |
|||
получается кому как повезет? у кого-то библиотека встанет ,а у кого-то нет? Селяви Код C:UsersGarry>pip 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 f:installpython38libsite-packages (from face_recognition) (0.3.0) Requirement already satisfied: Click>=6.0 in f:installpython38libsite-packages (from face_recognition) (7.1.2) Requirement already satisfied: numpy in f:installpython38libsite-packages (from face_recognition) (1.18.5+mkl) Requirement already satisfied: Pillow in f:installpython38libsite-packages (from face_recognition) (7.1.2) Collecting dlib>=19.7 Using cached dlib-19.20.0.tar.gz (3.2 MB) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... done Created wheel for dlib: filename=dlib-19.20.0-cp38-cp38-win_amd64.whl size=3640523 sha256=67c2842a6e52a45a077d0c6648ac8000fad07d1accb0 Stored in directory: c:usersgarryappdatalocalpipcachewheelsa5822c2d2ccc604e2c2e35994b89a173d922331f1c6e1af9320a7602 Successfully built dlib Installing collected packages: dlib, face-recognition Successfully installed dlib-19.20.0 face-recognition-1.3.0
Добавлено через 7 минут
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
02.08.2020, 16:55 |
7 |
Issue
Im trying to installing dlib on python 3.7 but it always failed
I’ve installed the cmake and add it to my environment, i’ve upgraded my pip into the latest version,
but everytime i run
pip install dlib
It returns error as
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:userscharlesappdatalocalprogramspythonpython37python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py'"'"'; __file__='"'"'C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersCharlesAppDataLocalTemppip-record-xchasbrxinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:userscharlesappdatalocalprogramspythonpython37Includedlib'
cwd: C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlib
Complete output (74 lines):
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.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibtoolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildlib.win-amd64-3.7 -DPYTHON_EXECUTABLE=c:userscharlesappdatalocalprogramspythonpython37python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildlib.win-amd64-3.7 -A x64'
-- Building for: Visual Studio 10 2010
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.3752.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/7/2020 12:37:32 PM.
Project "C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" on node 1 (default targets).
C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" (default target) (1) ->
C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibbuildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.01
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Charles/AppData/Local/Temp/pip-install-6wd_c0pw/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibsetup.py", line 261, in <module>
'Topic :: Software Development',
File "c:userscharlesappdatalocalprogramspythonpython37libsite-packagessetuptools__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilscore.py", line 148, in setup
dist.run_commands()
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "c:userscharlesappdatalocalprogramspythonpython37libsite-packagessetuptoolscommandinstall.py", line 61, in run
return orig.install.run(self)
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:userscharlesappdatalocalprogramspythonpython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibsetup.py", line 135, in run
self.build_extension(ext)
File "C:UsersCharlesAppDataLocalTemppip-install-6wd_c0pwdlibsetup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:userscharlesappdatalocalprogramspythonpython37libsubprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\users\charles\appdata\local\programs\python\python37\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:userscharlesappdatalocalprogramspythonpython37python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py'"'"'; __file__='"'"'C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersCharlesAppDataLocalTemppip-record-xchasbrxinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:userscharlesappdatalocalprogramspythonpython37Includedlib' Check the logs for full command output.
i also installed it by:
- go here https://pypi.org/simple/dlib/
- pick dlib-19.18.0.tar.gz
- extract it, and go into the folder
- open command line then run python setup.py install
it returns:
running install
running bdist_egg
running egg_info
writing dlib.egg-infoPKG-INFO
writing dependency_links to dlib.egg-infodependency_links.txt
writing top-level names to dlib.egg-infotop_level.txt
package init file 'dlib__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'toolspythonbuild*'
no previously-included directories found matching 'dlibtest'
writing manifest file 'dlib.egg-infoSOURCES.txt'
installing library code to buildbdist.win-amd64egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0toolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildlib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:UsersCharlesAppDataLocalProgramsPythonPython37python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildlib.win-amd64-3.7 -A x64'
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.3752.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/7/2020 12:21:15 PM.
Project "C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" on node 1 (default targets).
C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" (default target) (1) ->
C:UsersCharlesDownloadsdlib-19.18.0.tardistdlib-19.18.0buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.06
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Charles/Downloads/dlib-19.18.0.tar/dist/dlib-19.18.0/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptools__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptoolscommandinstall.py", line 67, in run
self.do_egg_install()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptoolscommandinstall.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptoolscommandbdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptoolscommandbdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptoolscommandinstall_lib.py", line 11, in run
self.build()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscommandinstall_lib.py", line 107, in build
self.run_command('build_ext')
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 135, in run
self.build_extension(ext)
File "setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsubprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\Users\Charles\AppData\Local\Programs\Python\Python37\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
i also tried install it from source as :
python -m pip install https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz#sha256=8ca127253a0ca82a3d847148515f82ff2c504ed77a6385ec4f38c7f8e5360860
it returning error as
Collecting https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz#sha256=8ca127253a0ca82a3d847148515f82ff2c504ed77a6385ec4f38c7f8e5360860
Using cached dlib-19.18.0.tar.gz (3.1 MB)
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:UsersCharlesAppDataLocalProgramsPythonPython37python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py'"'"'; __file__='"'"'C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersCharlesAppDataLocalTemppip-record-waso8gw6install-record.txt' --single-version-externally-managed --compile --install-headers 'C:UsersCharlesAppDataLocalProgramsPythonPython37Includedlib'
cwd: C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_
Complete output (74 lines):
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.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_toolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildlib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:UsersCharlesAppDataLocalProgramsPythonPython37python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildlib.win-amd64-3.7 -A x64'
-- Building for: Visual Studio 10 2010
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.3752.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/7/2020 12:53:19 PM.
Project "C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" on node 1 (default targets).
C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj" (default target) (1) ->
C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_buildtemp.win-amd64-3.7ReleaseCMakeFiles3.16.3VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.01
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Charles/AppData/Local/Temp/pip-req-build-k3302dt_/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptools__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsite-packagessetuptoolscommandinstall.py", line 61, in run
return orig.install.run(self)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_setup.py", line 135, in run
self.build_extension(ext)
File "C:UsersCharlesAppDataLocalTemppip-req-build-k3302dt_setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:UsersCharlesAppDataLocalProgramsPythonPython37libsubprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\Users\Charles\AppData\Local\Programs\Python\Python37\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:UsersCharlesAppDataLocalProgramsPythonPython37python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py'"'"'; __file__='"'"'C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersCharlesAppDataLocalTemppip-record-waso8gw6install-record.txt' --single-version-externally-managed --compile --install-headers 'C:UsersCharlesAppDataLocalProgramsPythonPython37Includedlib' Check the logs for full command output.
Im so lost, any response or suggestions will be appreciated so much. Thank you
Solution
You have figured it out yourself, but I wanted to add some remarks on your installation methods:
pip install dlib
As there is only the tar.gz
on pypi, it downloads that and then tries to run setup.py
after installing the reuqirements
Therefore, you manually doing the tar.gz
, extracting it and running python setup.py install
is the same thing as the first command and also
python -m pip install https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz
Is doing the same in the end, trying to run setup.py
to install.
In this case it involves the compilation of c/c++ code which requires for the right compiler/build tools to be installed which pip
cannot take care of. It is not built for this task.
Answered By — FlyingTeller
I was trying to install dlib library for face recognition in pycharm,
pip install dlib
I’m using virtual environment and base interpreter is C:UsersAyushmanAppDataLocalProgramsPythonPython38-32python.exe
Already installed cmake and pip.
python—version 3.8.3
pip—version 20.1.1
When I tried to install from setting, I got this error message:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:UsersAyushmanPycharmProjectsdemoProjectvenvScriptspython.exe'.
When I used terminal, I got this error message:
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
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: Command errored out with exit status 1:
command: 'c:usersayushmanpycharmprojectsdemoprojectvenvscriptspython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Ayushman
\AppData\Local\Temp\pip-install-7crglpz8\dlib\setup.py'"'"'; __file__='"'"'C:\Users\Ayushman\AppData\Local\Temp\pip-install-7crglpz8\dlib\setup.py'"'"'
;f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' ins
tall --record 'C:UsersAyushmanAppDataLocalTemppip-record-id9u7hlkinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:users
ayushmanpycharmprojectsdemoprojectvenvincludesitepython3.8dlib'
cwd: C:UsersAyushmanAppDataLocalTemppip-install-7crglpz8dlib
Complete output (80 lines):
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.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)]
Invoking CMake setup: 'cmake C:UsersAyushmanAppDataLocalTemppip-install-7crglpz8dlibtoolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersAyushmanAppDa
taLocalTemppip-install-7crglpz8dlibbuildlib.win32-3.8 -DPYTHON_EXECUTABLE=c:usersayushmanpycharmprojectsdemoprojectvenvscriptspython.exe -DCMAKE_LIBRARY
_OUTPUT_DIRECTORY_RELEASE=C:UsersAyushmanAppDataLocalTemppip-install-7crglpz8dlibbuildlib.win32-3.8'
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ayushman/AppData/Local/Temp/pip-install-7crglpz8/dlib/build/temp.win32-3.8/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Ayushman/AppData/Local/Temp/pip-install-7crglpz8/dlib/build/temp.win32-3.8/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersAyushmanAppDataLocalTemppip-install-7crglpz8dlibsetup.py", line 223, in <module>
setup(
File "c:usersayushmanpycharmprojectsdemoprojectvenvlibsite-packagessetuptools__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "c:usersayushmanpycharmprojectsdemoprojectvenvlibsite-packagessetuptoolscommandinstall.py", line 61, in run
return orig.install.run(self)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersAyushmanAppDataLocalTemppip-install-7crglpz8dlibsetup.py", line 135, in run
self.build_extension(ext)
File "C:UsersAyushmanAppDataLocalTemppip-install-7crglpz8dlibsetup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:UsersAyushmanAppDataLocalProgramsPythonPython38-32libsubprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\Ayushman\AppData\Local\Temp\pip-install-7crglpz8\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT
_DIRECTORY=C:\Users\Ayushman\AppData\Local\Temp\pip-install-7crglpz8\dlib\build\lib.win32-3.8', '-DPYTHON_EXECUTABLE=c:\users\ayushman\pycharmprojects\d
emoproject\venv\scripts\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ayushman\AppData\Local\Temp\pip-install-7crglpz8\dlib\build\lib.w
in32-3.8']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersayushmanpycharmprojectsdemoprojectvenvscriptspython.exe' -u -c 'import sys, setuptools, tokenize; sys.a
rgv[0] = '"'"'C:\Users\Ayushman\AppData\Local\Temp\pip-install-7crglpz8\dlib\setup.py'"'"'; __file__='"'"'C:\Users\Ayushman\AppData\Local\Temp\pip-inst
all-7crglpz8\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code
, __file__, '"'"'exec'"'"'))' install --record 'C:UsersAyushmanAppDataLocalTemppip-record-id9u7hlkinstall-record.txt' --single-version-externally-managed --co
mpile --install-headers 'c:usersayushmanpycharmprojectsdemoprojectvenvincludesitepython3.8dlib' Check the logs for full command output.