Python can';无法编译openssl,因为';cl';不被承认
我正在尝试为python脚本编译openssl库。我使用的是Windowsx64位 我现在在这方面采取以下步骤: 它一直工作到我在VS 2015的开发者命令提示符中键入这个命令Python can';无法编译openssl,因为';cl';不被承认,python,visual-studio,openssl,swig,Python,Visual Studio,Openssl,Swig,我正在尝试为python脚本编译openssl库。我使用的是Windowsx64位 我现在在这方面采取以下步骤: 它一直工作到我在VS 2015的开发者命令提示符中键入这个命令nmake-f ms\ntdll.mak。 我得到这个错误: 'cl' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'cl' : return
nmake-f ms\ntdll.mak
。
我得到这个错误:
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
我看了这个论坛以前的帖子。解决方案表示将此路径添加到环境变量:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
这并没有解决问题。另外,当我浏览bin目录时,我看不到他们在解决方案上指向的文件:vcvars32.bat
。这就是我所看到的:
你能帮忙吗?我还想知道为什么VS2015安装在程序文件(86)中而不是64中
请注意,我安装了SWIG并添加了环境变量:C:\grr build\swigwin-3.0.6
更新:
我确实从VS安装了VC++工具。我使用的是VS 2015社区版。我重复了这些步骤,这一次我在键入时遇到了不同的错误:nmake-f ms\ntdll.mak
错误显示:
C:\grr-build\openssl-1.0.2d>nmake -f ms\ntdll.mak
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
C:\grr-build\openssl-1.0.2d>nmake -f ms\ntdll.mak
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
Building OpenSSL
perl .\util\copy-if-different.pl ".\crypto\buildinf.h" "tmp32dll\buildin
f.h"
Copying: ./crypto/buildinf.h to tmp32dll/buildinf.h
perl .\util\copy-if-different.pl ".\crypto\opensslconf.h" "inc32\openssl
\opensslconf.h"
NOT copying: ./crypto/opensslconf.h to inc32/openssl/opensslconf.h
ml64 /c /Cp /Cx /Zi /Fotmp32dll\x86_64cpuid.obj tmp32dll\x86_64cpuid.asm
'ml64' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'ml64' : return code '0x1'
Stop.
C:\grr-build\openssl-1.0.2d>
更新:
在完成下面发布的解决方案后,此问题已得到解决,但请记住,您需要为nasm设置环境变量在VisualStudio 2015中默认情况下没有安装C++工具。再次运行安装程序,在“<代码>自定义< /代码>”下安装C++部件:
现在缺少ml64.exe。我在“C:\Program Files(x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\”和C:\Program Files(x86)\Microsoft Visual Studio 14.0\VC\bin\x86\u amd64”下看到它。在为nasm添加环境变量后,此错误得到解决。但我仍在努力解决另一个新问题。我把它贴在了一个新的帖子里。