简体   繁体   English

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

[英]Installing distorm3 via pip gives Windows SDK build error

I'm getting an error that the right Windows SDK version is not installed on my machine when attempting to pip install the distorm3 package.尝试pip install distorm3包时,我收到错误消息,指出我的计算机上未安装正确的 Windows SDK 版本。 I could install the SDK, but I want to know what is causing this as I guess it is not normal.我可以安装 SDK,但我想知道是什么导致了这种情况,因为我猜这不正常。

I am using pip 19.3.1 (python2.7.17 x64)我正在使用 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.

Distorm3 apparently has binary wheels available only for Python 3.6 on Win32 . Distorm3 显然具有仅适用于 Win32 上的 Python 3.6 的二进制轮子

For other platforms and Python versions, it will need to build the binary components upon installation.对于其他平台和 Python 版本,需要在安装时构建二进制组件。 Since you don't have the necessary SDK, that's what's failing right now.由于您没有必要的 SDK,这就是现在失败的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM