【问题标题】:Installing SIP (for PyQt5) on Windows 10 with VS 2017在带有 VS 2017 的 Windows 10 上安装 SIP(​​用于 PyQt5)
【发布时间】:2018-05-09 16:25:55
【问题描述】:

我在以前的安装中成功地使用了这里的答案,但这次遇到了障碍:How to install SIP & PyQT on windows 7

我在nmake 步骤中遇到错误(见下文):

C:\source>cd sip-4.19.9

C:\source\sip-4.19.9>python configure.py
This is SIP 4.19.9.dev1804161501 for Python 2.7.14 on win32.
The SIP code generator will be installed in c:\python27.
The sip module will be installed in c:\python27\Lib\site-packages.
The sip.pyi stub file will be installed in c:\python27\Lib\site-packages.
The sip.h header file will be installed in c:\python27\include.
The default directory to install .sip files in is c:\python27\sip.
Creating siplib\sip.h...
Creating siplib\siplib.c...
Creating siplib\siplib.sbf...
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...


C:\source\sip-4.19.9>"C:\Qt\5.10.0\msvc2015\bin\qtenv2.bat"
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!

C:\Qt\5.10.0\msvc2015>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"

C:\Qt\5.10.0\msvc2015>cd \source\sip-4.19.9

C:\source\sip-4.19.9>nmake

Microsoft (R) Program Maintenance Utility Version 14.00.24234.1
Copyright (C) Microsoft Corporation.  All rights reserved.

    cd sipgen
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"

Microsoft (R) Program Maintenance Utility Version 14.00.24234.1
Copyright (C) Microsoft Corporation.  All rights reserved.

    cd siplib
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"

Microsoft (R) Program Maintenance Utility Version 14.00.24234.1
Copyright (C) Microsoft Corporation.  All rights reserved.

       cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -DNDEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -I. -Ic:\python27\include -Fo @C:\Users\suzanne\AppData\Local\Temp\nmB36B.tmp
siplib.c
apiversions.c
descriptors.c
qtlib.c
threads.c
objmap.c
voidptr.c
array.c
int_convertors.c
Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34189 -DNDEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -I. -Ic:\python27\include -Fo @C:\Users\suzanne\AppData\Local\Temp\nmB8AB.tmp
bool.cpp
        link /NOLOGO /DYNAMICBASE /NXCOMPAT /DLL /MANIFEST /MANIFESTFILE:sip.pyd.manifest /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /OUT:sip.pyd     @C:\Users\suzanne\AppData\Local\Temp\nmB939.tmp
   Creating library sip.lib and object sip.exp
        mt -nologo -manifest sip.pyd.manifest -outputresource:sip.pyd;2
'mt' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'mt' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio     14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

【问题讨论】:

    标签: windows python-2.7


    【解决方案1】:

    想通了……

    mt.exe 是 Visual Studio 的 Windows SDK 的一部分,未安装。通过获取工具和功能返回并安装它。

    然后找到 \x86\mt.exe 并将其添加到路径中。

    【讨论】:

      猜你喜欢
      • 2021-12-10
      • 2021-08-09
      • 1970-01-01
      • 2018-05-24
      • 1970-01-01
      • 1970-01-01
      • 2020-04-27
      • 2020-08-09
      • 1970-01-01
      相关资源
      最近更新 更多