通过pip安装distorm3会导致Windows SDK构建错误

时间:2020-01-14 07:49:03

标签: python pip

当尝试pip install distorm3软件包时,我的机器上没有安装正确的Windows SDK版本,这是一个错误。我可以安装SDK,但是我想知道是什么原因造成的,因为我认为这是不正常的。

我正在使用pip 19.3.1(python2.7.17 x64)

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting distorm3
  Using cached https://files.pythonhosted.org/packages/2c/e3/84a3a99904c368daa1de5e85a6e9cc07189e7f66cb1338a9ebf93fa051bd/distorm3-3.4.1.tar.gz
Installing collected packages: distorm3
    Running setup.py install for distorm3 ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\dunaa\\appdata\\local\\temp\\pip-install-ykfjni\\distorm3\\setup.py'"'"'; __file__='"'"'c:\\users\\dunaa\\appdata\\local\\temp\\pip-install-ykfjni\\distorm3\\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\dunaa\appdata\local\temp\pip-record-vvm9pv\install-record.txt' --single-version-externally-managed --compile
         cwd: c:\users\dunaa\appdata\local\temp\pip-install-ykfjni\distorm3\
    Complete output (42 lines):
    running install
    running build
    running custom_build
    Compiling with VS100COMNTOOLS: msbuild /p:Configuration=dll /p:Platform=win32 make/win32/distorm.sln
    Setting environment for using Microsoft Visual Studio 2010 x86 tools.
    ERROR: Cannot determine the location of the VS Common Tools folder.
    'msbuild' is not recognized as an internal or external command,
    operable program or batch file.
    compilation with VS100COMNTOOLS failed
    searching for vcvarsall.bat
    Compiling with C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
    **********************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.4.2
    ** Copyright (c) 2019 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x86'
    Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

    Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
    Build started 1/14/2020 9:45:54 AM.
    Project "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\distorm.sln" on node 1 (default targets).
    ValidateSolutionConfiguration:
      Building solution configuration "dll|win32".
    Project "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\distorm.sln" (1) is building "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\cdistorm.vcxproj" (2) on node 1 (default targets).
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17134.0 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\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\cdistorm.vcxproj]
    Done Building Project "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\cdistorm.vcxproj" (default targets) -- FAILED.
    Done Building Project "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\distorm.sln" (default targets) -- FAILED.

    Build FAILED.

    "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\distorm.sln" (default target) (1) ->
    "c:\Users\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\cdistorm.vcxproj" (default target) (2) ->
    (_CheckWindowsSDKInstalled target) ->
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17134.0 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\dunaa\AppData\Local\Temp\pip-install-ykfjni\distorm3\make\win32\cdistorm.vcxproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.25
    compilation failed
    error: Failed to compile "make/win32/distorm.sln" with any available compiler
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\dunaa\\appdata\\local\\temp\\pip-install-ykfjni\\distorm3\\setup.py'"'"'; __file__='"'"'c:\\users\\dunaa\\appdata\\local\\temp\\pip-install-ykfjni\\distorm3\\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\dunaa\appdata\local\temp\pip-record-vvm9pv\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

1 个答案:

答案 0 :(得分:0)

Distorm3 apparently has binary wheels available only for Python 3.6 on Win32

对于其他平台和Python版本,将需要在安装时构建二进制组件。由于您没有必要的SDK,因此这就是现在的失败。