【发布时间】:2013-05-26 15:19:23
【问题描述】:
当我尝试使用命令在 Windows 上安装 PyQt5 时
python configure.py
我收到此错误:
Error: Make sure you have a working Qt qmake on your PATH.
我从PyQt5 Download得到了pyQt5。
如何安装 PyQt5?
更新:
我从Qt Download page 安装了Qt 5.0.2 for Windows 64-bit (VS 2012, 500 MB),现在出现了这个错误:
Querying qmake about your Qt installation... Determining the details of your Qt installation... Error: Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.
当我执行命令python configure.py --verbose:
Querying qmake about your Qt installation... Determining the details of your Qt installation... C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\bin\qmake.exe -spec win32-msvc2008 -o qtdetail.m k qtdetail.pro nmake -f qtdetail.mk release 'nmake' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes. Error: Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.
我在 PATH 中添加了 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin(包含 nmake.exe),但出现此错误:
Querying qmake about your Qt installation... Determining the details of your Qt installation... C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\bin\qmake.exe -spec win32-msvc2008 -o qtdetail.mk qtdetail.pro nmake -f qtdetail.mk release Microsoft (R) Program Maintenance Utility Version 11.00.50727.1 Copyright (C) Microsoft Corporation. All rights reserved. "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\nmake.exe" -f qtdetail.mk.Release Microsoft (R) Program Maintenance Utility Version 11.00.50727.1 Copyright (C) Microsoft Corporation. All rights reserved. cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MD -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_CORE_LIB -I"..\..\..\..\..\..\..\Qt\Qt5.0.2\5.0.2\msvc2012_64\include" -I"..\..\..\..\..\..\..\Qt\Qt5.0.2\5.0.2\msvc2012_64\include\QtCore" -I"release" -I"..\..\..\..\..\..\..\Qt\Qt5.0.2\5.0.2\msvc2012_64\mkspecs\win32-msvc2008" -Forelease\ @C:\Users\Victor\AppData\Local\Temp\nm68EA.tmp NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cl.EXE"' : return code '0xc0000135' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\nmake.exe"' : return code '0x2' Stop.
【问题讨论】:
-
你安装QT了吗? pyQT 应该需要 QT。
-
我安装了 QT,现在又遇到另一个错误:
'nmake' is not recognized as an internal command。如何解决这个问题? -
我认为虽然您已将 nmake.exe 添加到您的 PATH 中,但还需要设置其他环境变量(例如您的包含和库路径)。对我有用的是运行 Visual Studio 命令提示符中的所有命令。这将自动设置所有必要的环境变量。 VS Cmd Prompt 应该与 VS 一起安装,并且应该在你的开始菜单中。我成功编译并安装了 PyQT5,但是当我运行任何示例时,我都会收到如下错误: from PyQt5.QtCore import QEventLoop, QTime SystemError: error return without exception set
-
@actf pip3 install pyqt5
标签: python windows qt nmake pyqt5