Python ошибка при установке dlib

При использовании команды:

pip install dlib 

Выдает ошибку:

"c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\eezbe\appdata\local\programs\thonny\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\eezbe\AppData\Local\Temp\pip-install-kcgx0v3t\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\eezbe\AppData\Local\Temp\pip-install-kcgx0v3t\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\eezbe\appdata\local\programs\thonny\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-kcgx0v3t\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-kcgx0v3t\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\eezbe\\appdata\\local\\programs\\thonny\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-kcgx0v3t\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status 1.
—--------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\eezbe\appdata\local\programs\thonny\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-kcgx0v3t\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-kcgx0v3t\\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\eezbe\AppData\Local\Temp\pip-record-6joaylx3\install-record.txt' —single-version-externally-managed —compile —install-headers 'c:\users\eezbe\appdata\local\programs\thonny\Include\dlib' Check the logs for full command output.

Как я могу это исправить?


UPD

Collecting dlib
  Using cached dlib-19.20.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:\users\eezbe\appdata\local\programs\thonny\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\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\eezbe\AppData\Local\Temp\pip-record-4ohgzi59\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\eezbe\appdata\local\programs\thonny\Include\dlib'
         cwd: C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\
    Complete output (65 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.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 09:44:33) [MSC v.1900 32 bit (Intel)]
    Invoking CMake setup: 'cmake C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\build\lib.win32-3.7 -DPYTHON_EXECUTABLE=c:\users\eezbe\appdata\local\programs\thonny\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\build\lib.win32-3.7'
    -- Building for: Visual Studio 16 2019
    -- The C compiler identification is MSVC 19.26.28806.0
    -- The CXX compiler identification is MSVC 19.26.28806.0
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe - works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe - works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found PythonInterp: C:/Users/eezbe/AppData/Local/Programs/Thonny/python.exe (found version "3.7.7")
    CMake Error at C:/Users/eezbe/AppData/Local/Temp/pip-install-izoqttv6/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:124 (message):
      Python config failure: Python is 32-bit, chosen compiler is 64-bit
    Call Stack (most recent call first):
      C:/Users/eezbe/AppData/Local/Temp/pip-install-izoqttv6/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
      C:/Users/eezbe/AppData/Local/Temp/pip-install-izoqttv6/dlib/dlib/external/pybind11/CMakeLists.txt:33 (include)


    -- Configuring incomplete, errors occurred!
    See also "C:/Users/eezbe/AppData/Local/Temp/pip-install-izoqttv6/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\setup.py", line 261, in <module>
        'Topic :: Software Development',
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\setup.py", line 135, in run
        self.build_extension(ext)
      File "C:\Users\eezbe\AppData\Local\Temp\pip-install-izoqttv6\dlib\setup.py", line 172, in build_extension
        subprocess.check_call(cmake_setup, cwd=build_folder)
      File "c:\users\eezbe\appdata\local\programs\thonny\lib\subprocess.py", line 363, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\eezbe\\appdata\\local\\programs\\thonny\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\eezbe\appdata\local\programs\thonny\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\eezbe\\AppData\\Local\\Temp\\pip-install-izoqttv6\\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\eezbe\AppData\Local\Temp\pip-record-4ohgzi59\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\eezbe\appdata\local\programs\thonny\Include\dlib' Check the logs for full command output.

I am trying to install OpenCV, dlib on Windows 10 on Anaconda Python 3.7.

I have installed Visual studio 2015 as prerequisite along with CMake. When I am trying to install dlib on my computer it is giving me below error. I am also not able to install OpenCV. I tried installing the dlib using .whl file. But, still no luck.

Collecting dlib
  Using cached https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\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\dbi227\AppData\Local\Temp\pip-wheel-2nm313mu' --python-tag cp37
       cwd: C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\
  Complete output (73 lines):
  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.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
  Invoking CMake setup: 'cmake C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\lib.win-amd64-3.7 -A x64'
  -- Building for: Visual Studio 14 2015
  -- Selecting Windows SDK version  to target Windows 10.0.17763.
  CMake Error at CMakeLists.txt:3 (project):
    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 10/23/2019 9:27:01 AM.
      Project "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj" on node 1 (default targets).
      C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj]
      Done Building Project "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.

      Build FAILED.

      "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj" (default target) (1) ->
      (Desktop_PlatformPrepareForBuild target) ->
        C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj]

          0 Warning(s)
          1 Error(s)

      Time Elapsed 00:00:00.51


    Exit code: 1



  -- Configuring incomplete, errors occurred!
  See also "C:/Users/dbi227/AppData/Local/Temp/pip-install-9vjrsx_l/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\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\setup.py", line 261, in <module>
      'Topic :: Software Development',
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
      self.run_command('build')
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\setup.py", line 135, in run
      self.build_extension(ext)
    File "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\setup.py", line 172, in build_extension
      subprocess.check_call(cmake_setup, cwd=build_folder)
    File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\dbi227\\AppData\\Local\\Continuum\\anaconda3\\envs\\opencv-env\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\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: Command errored out with exit status 1:
     command: 'C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\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\dbi227\AppData\Local\Temp\pip-record-3ic8n66v\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\
    Complete output (75 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 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
    Invoking CMake setup: 'cmake C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\lib.win-amd64-3.7 -A x64'
    -- Building for: Visual Studio 14 2015
    -- Selecting Windows SDK version  to target Windows 10.0.17763.
    CMake Error at CMakeLists.txt:3 (project):
      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 10/23/2019 9:27:03 AM.
        Project "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj" on node 1 (default targets).
        C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj]
        Done Building Project "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.

        Build FAILED.

        "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj" (default target) (1) ->
        (Desktop_PlatformPrepareForBuild target) ->
          C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.15.3\VCTargetsPath.vcxproj]

            0 Warning(s)
            1 Error(s)

        Time Elapsed 00:00:00.10


      Exit code: 1



    -- Configuring incomplete, errors occurred!
    See also "C:/Users/dbi227/AppData/Local/Temp/pip-install-9vjrsx_l/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\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\setup.py", line 261, in <module>
        'Topic :: Software Development',
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\setup.py", line 135, in run
        self.build_extension(ext)
      File "C:\Users\dbi227\AppData\Local\Temp\pip-install-9vjrsx_l\dlib\setup.py", line 172, in build_extension
        subprocess.check_call(cmake_setup, cwd=build_folder)
      File "C:\Users\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\dbi227\\AppData\\Local\\Continuum\\anaconda3\\envs\\opencv-env\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\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\dbi227\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\dbi227\\AppData\\Local\\Temp\\pip-install-9vjrsx_l\\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\dbi227\AppData\Local\Temp\pip-record-3ic8n66v\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

Expected Behavior

Expected dlib to be instalable on Windows 10 running Python 3.6 (as a conda virtual env) with command: pip install dlib. Have installed cmake and numpy as prerequisites. This failed with:

(py36) PS C:\Users\Jean Claude> pip install dlib
Collecting dlib
Using cached dlib-19.22.0.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\Jean Claude\anaconda3\envs\py36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'»‘»‘; file='»‘»‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\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\JEANCL1\AppData\Local\Temp\pip-wheel-03d14jpb’
cwd: C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b
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.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: ‘cmake C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=C:\Users\Jean Claude\anaconda3\envs\py36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -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 «», line 1, in
File «C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py», line 261, in
‘Topic :: Software Development’,
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\site-packages\setuptools_init_.py», line 153, in setup
return distutils.core.setup(**attrs)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\core.py», line 148, in setup
dist.run_commands()
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py», line 955, in run_commands
self.run_command(cmd)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py», line 974, in run_command
cmd_obj.run()
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\site-packages\wheel\bdist_wheel.py», line 299, in run
self.run_command(‘build’)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\cmd.py», line 313, in run_command
self.distribution.run_command(command)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py», line 974, in run_command
cmd_obj.run()
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\command\build.py», line 135, in run
self.run_command(cmd_name)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\cmd.py», line 313, in run_command
self.distribution.run_command(command)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py», line 974, in run_command
cmd_obj.run()
File «C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py», line 134, in run
self.build_extension(ext)
File «C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py», line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File «C:\Users\Jean Claude\anaconda3\envs\py36\lib\subprocess.py», line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\tools\python’, ‘-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6’, ‘-DPYTHON_EXECUTABLE=C:\Users\Jean Claude\anaconda3\envs\py36\python.exe’, ‘-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6’, ‘-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: Command errored out with exit status 1:
command: ‘C:\Users\Jean Claude\anaconda3\envs\py36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'»‘»‘; file='»‘»‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\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\JEANCL1\AppData\Local\Temp\pip-record-odoruwut\install-record.txt’ —single-version-externally-managed —compile —install-headers ‘C:\Users\Jean Claude\anaconda3\envs\py36\Include\dlib’
cwd: C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b
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.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: ‘cmake C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=C:\Users\Jean Claude\anaconda3\envs\py36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -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\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py", line 261, in <module>
    'Topic :: Software Development',
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py", line 134, in run
    self.build_extension(ext)
  File "C:\Users\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py", line 171, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\JEANCL~1\\AppData\\Local\\Temp\\pip-install-bdv23ese\\dlib_6034d75b85f2455eaa1e85e06b14242b\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\JEANCL~1\\AppData\\Local\\Temp\\pip-install-bdv23ese\\dlib_6034d75b85f2455eaa1e85e06b14242b\\build\\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=C:\\Users\\Jean Claude\\anaconda3\\envs\\py36\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\JEANCL~1\\AppData\\Local\\Temp\\pip-install-bdv23ese\\dlib_6034d75b85f2455eaa1e85e06b14242b\\build\\lib.win-amd64-3.6', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: ‘C:\Users\Jean Claude\anaconda3\envs\py36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'»‘»‘; file='»‘»‘C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\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\JEANCL~1\AppData\Local\Temp\pip-record-odoruwut\install-record.txt’ —single-version-externally-managed —compile —install-headers ‘C:\Users\Jean Claude\anaconda3\envs\py36\Include\dlib’ Check the logs for full command output.

Всем привет, возникает вот такая ошибка при установке dlib.
Сайты из за бугра не помогли, прошу помощи у наших русских богатырей.

C:\Users\Владислав\Downloads>pip install dlib
Collecting dlib
  Using cached dlib-19.19.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\владислав\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\4918~1\\AppData\\Local\\Temp\\pip-install-5f9hhllb\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\4918~1\\AppData\\Local\\Temp\\pip-install-5f9hhllb\\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\4918~1\AppData\Local\Temp\pip-wheel-mwdn_6pi'
       cwd: C:\Users\4918~1\AppData\Local\Temp\pip-install-5f9hhllb\dlib\
  Complete output (64 lines):
  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.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]
  Invoking CMake setup: 'cmake C:\Users\4918~1\AppData\Local\Temp\pip-install-5f9hhllb\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\4918~1\AppData\Local\Temp\pip-install-5f9hhllb\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=c:\users\владислав\appdata\local\programs\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\4918~1\AppData\Local\Temp\pip-install-5f9hhllb\dlib\build\lib.win-amd64-3.7 -A x64'
  -- Building for: Visual Studio 16 2019
  -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
  -- The C compiler identification is MSVC 19.25.28614.0
  -- The CXX compiler identification is MSVC 19.25.28614.0
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found PythonInterp: C:/Users/Владислав/AppData/Local/Programs/Python/Python37/python.exe (found version "3.7.7")
  CMake Error at C:/Users/Владислав/AppData/Local/Temp/pip-install-5f9hhllb/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:158 (message):
    Python libraries not found
  Call Stack (most recent call first):
    C:/Users/Владислав/AppData/Local/Temp/pip-install-5f9hhllb/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
    C:/Users/Владислав/AppData/Local/Temp/pip-install-5f9hhllb/dlib/dlib/external/pybind11/CMakeLists.txt:33 (include)

5e9ac75e0ddae945473146.png5e9ac76d9ffc7055061710.png5e9ac77100bbf964909379.png5e9ac796af9ee046060934.png

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:\users\charles\appdata\local\programs\python\python37\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Charles\AppData\Local\Temp\pip-record-xchasbrx\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\charles\appdata\local\programs\python\python37\Include\dlib'
         cwd: C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\
    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:\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'
    -- 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:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" on node 1 (default targets).
        C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\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\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.

        Build FAILED.

        "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default target) (1) ->
          C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\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.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:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py", line 261, in <module>
        'Topic :: Software Development',
      File "c:\users\charles\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\charles\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py", line 135, in run
        self.build_extension(ext)
      File "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py", line 172, in build_extension
        subprocess.check_call(cmake_setup, cwd=build_folder)
      File "c:\users\charles\appdata\local\programs\python\python37\lib\subprocess.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:\users\charles\appdata\local\programs\python\python37\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Charles\AppData\Local\Temp\pip-record-xchasbrx\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\charles\appdata\local\programs\python\python37\Include\dlib' Check the logs for full command output.

i also installed it by:

  1. go here https://pypi.org/simple/dlib/
  2. pick dlib-19.18.0.tar.gz
  3. extract it, and go into the folder
  4. open command line then run python setup.py install

it returns:

running install
running bdist_egg
running egg_info
writing dlib.egg-info\PKG-INFO
writing dependency_links to dlib.egg-info\dependency_links.txt
writing top-level names to dlib.egg-info\top_level.txt
package init file 'dlib\__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\test'
writing manifest file 'dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: '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'
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:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\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\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default target) (1) ->
      C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\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.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:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.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:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\subprocess.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:\Users\Charles\AppData\Local\Programs\Python\Python37\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Charles\AppData\Local\Temp\pip-record-waso8gw6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Charles\AppData\Local\Programs\Python\Python37\Include\dlib'
         cwd: C:\Users\Charles\AppData\Local\Temp\pip-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:\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'
    -- 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:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" on node 1 (default targets).
        C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\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\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.

        Build FAILED.

        "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default target) (1) ->
          C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\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.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:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py", line 261, in <module>
        'Topic :: Software Development',
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py", line 135, in run
        self.build_extension(ext)
      File "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py", line 172, in build_extension
        subprocess.check_call(cmake_setup, cwd=build_folder)
      File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\subprocess.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:\Users\Charles\AppData\Local\Programs\Python\Python37\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Charles\AppData\Local\Temp\pip-record-waso8gw6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Charles\AppData\Local\Programs\Python\Python37\Include\dlib' 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

Понравилась статья? Поделить с друзьями:
  • Python ошибка при установке 0x80070659
  • Qt creator ошибка lnk2019
  • Python ошибка отступа неожиданный отступ
  • Python ошибка индекса
  • Qt creator настройки android содержат ошибки