使用VS2017无法在Windows 10上安装distorm

时间:2017-12-28 18:34:43

标签: windows python-3.x visual-studio-2017

D:\src\distorm-master>py -3.6-32 setup.py install
running install
running build
running custom_build
Compiling with VS150COMNTOOLS: msbuild /p:Configuration=dll /p:Platform=win32 
make/win32/distorm.sln
'"C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\Tools\..\..\vc\vcvarsall.bat"' is not 
recognized as an internal or external command,
operable program or batch file.
compilation with VS150COMNTOOLS failed
error: Failed to compile "make/win32/distorm.sln" with any available compiler

vcvarsall路径不存在。我在其他地方找到它并正确设置VS150COMNTOOLS路径,但仍无效:

D:\src\distorm-master>set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build

D:\src\distorm-master>set vs
VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x86
VSCMD_VER=15.5.2
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\

D:\src\distorm-master>py -3.6-32 setup.py install
running install
running build
running custom_build
Compiling with VS150COMNTOOLS: msbuild /p:Configuration=dll /p:Platform=win32 make/win32/distorm.sln
The system cannot find the path specified.
compilation with VS150COMNTOOLS failed
error: Failed to compile "make/win32/distorm.sln" with any available compiler

但这条道路确实存在:

Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build

12/17/2017  11:07 PM    <DIR>          .
12/17/2017  11:07 PM    <DIR>          ..
12/17/2017  10:36 PM                13 Microsoft.VCRedistVersion.default.txt
12/17/2017  10:36 PM               291 Microsoft.VCToolsVersion.default.props
12/17/2017  10:36 PM                13 Microsoft.VCToolsVersion.default.txt
12/17/2017  10:36 PM                39 vcvars32.bat
12/17/2017  10:36 PM                39 vcvars64.bat
12/17/2017  10:36 PM             9,187 vcvarsall.bat
12/17/2017  10:36 PM                43 vcvarsamd64_x86.bat
12/17/2017  10:36 PM                43 vcvarsx86_amd64.bat
               8 File(s)          9,668 bytes
               2 Dir(s)  45,319,999,488 bytes free

1 个答案:

答案 0 :(得分:1)

来自wiki

  

如您所见,编译中不再支持Python   本身。

源代码库中有一个cdistorm.vcxproj文件。尝试使用它。