Python Forum

Full Version: pip install dlib packge issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
pip install dlib packge issue please help me

C:\WINDOWS\system32>pip install dlib
Collecting dlib
Using cached dlib-19.22.1.tar.gz (7.4 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\thaku\appdata\local\programs\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\thaku\\AppData\\Local\\Temp\\pip-install-15x1l4gp\\dlib_6529c23c38f347f8a2b61a70bd9db593\\setup.py'"'"'; __file__='"'"'C:\\Users\\thaku\\AppData\\Local\\Temp\\pip-install-15x1l4gp\\dlib_6529c23c38f347f8a2b61a70bd9db593\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\thaku\AppData\Local\Temp\pip-wheel-53i75jht'
cwd: C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\
Complete output (78 lines):
C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\setup.py:212: SyntaxWarning: invalid escape sequence \(
major = re.findall("set\(CPACK_PACKAGE_VERSION_MAJOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\setup.py:213: SyntaxWarning: invalid escape sequence \(
minor = re.findall("set\(CPACK_PACKAGE_VERSION_MINOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\setup.py:214: SyntaxWarning: invalid escape sequence \(
patch = re.findall("set\(CPACK_PACKAGE_VERSION_PATCH.*\"(.*)\"", open(cmake_file).read())[0]
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.0b2 (tags/v3.8.0b2:21dd01d, Jul 4 2019, 16:00:09) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\users\thaku\appdata\local\programs\python\python38\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\lib.win-amd64-3.8 -A x64'
-- Building for: Visual Studio 10 2010
CMake Error at CMakeLists.txt:14 (project):
Failed to run MSBuild command:

C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe

to get the value of VCTargetsPath:

Microsoft ® Build Engine version 4.8.4084.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright © Microsoft Corporation. All rights reserved.

Build started 31-08-2021 12:47:20.
Project "C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\temp.win-amd64-3.8\Release\CMakeFiles\3.21.1\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\temp.win-amd64-3.8\Release\CMakeFiles\3.21.1\VCTargetsPath.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:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\temp.win-amd64-3.8\Release\CMakeFiles\3.21.1\VCTargetsPath.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\temp.win-amd64-3.8\Release\CMakeFiles\3.21.1\VCTargetsPath.vcxproj" (default target) (1) ->
C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\build\temp.win-amd64-3.8\Release\CMakeFiles\3.21.1\VCTargetsPath.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.12


Exit code: 1



-- Configuring incomplete, errors occurred!
See also "C:/Users/thaku/AppData/Local/Temp/pip-install-15x1l4gp/dlib_6529c23c38f347f8a2b61a70bd9db593/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\setup.py", line 222, in <module>
setup(
File "c:\users\thaku\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\thaku\appdata\local\programs\python\python38\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\thaku\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\thaku\AppData\Local\Temp\pip-install-15x1l4gp\dlib_6529c23c38f347f8a2b61a70bd9db593\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\thaku\appdata\local\programs\python\python38\lib\subprocess.py", line 348, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\thaku\\AppData\\Local\\Temp\\pip-install-15x1l4gp\\dlib_6529c23c38f347f8a2b61a70bd9db593\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\thaku\\AppData\\Local\\Temp\\pip-install-15x1l4gp\\dlib_6529c23c38f347f8a2b61a70bd9db593\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\thaku\\appdata\\local\\programs\\python\\python38\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\thaku\\AppData\\Local\\Temp\\pip-install-15x1l4gp\\dlib_6529c23c38f347f8a2b61a70bd9db593\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
Look at dlib Repo so need Compiling with tool from Visual Studio.
If look at issues so have someone make a wheel this make simpler,qucik test but i got error message with that wheel.
How to install dlib library for Python in Windows 10