When I try installing the PyQt5 on Windows using the command
python configure.py
I get this error:
Error: Make sure you have a working Qt qmake on your PATH.
I got the pyQt5 from PyQt5 Download.
How can I install PyQt5?
Update:
I installed Qt 5.0.2 for Windows 64-bit (VS 2012, 500 MB)
from the Qt Download page and now I have this error:
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.
And when I execute the command 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.
I added C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
(contains nmake.exe
) to PATH and I got this error:
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.
You can easily install it using Anaconda. At first install Anaconda or Miniconda on you system (download from here) and then install the pyqt as follow:
It works for both version of python (2 and 3).
The easiest way to install PyQt is to just use the installer (Link in your answer, step #5). If you install python 3.3, the installer will add all of the PyQt5 extras to that python installation automatically. You won't need to do any compiling (none of: nmake, nmake install, python configure).
All of the build options are available for if you need a custom install (for instance, using a different version of python, where there isn't an installer provided by riverbank computing).
If you do need to compile your own version of PyQt5, the steps (as you have found) are here, but assume you have python and a compiler installed and in your path. The installed and in your path have been where you have been running into trouble it seems. I'd recommend using the installer version, but you need to install python 3.3 first.
To install the GPL version of PyQt5, run (see PyQt5 Project):
This will install the Python wheel for your platform and your version of Python (assuming both are supported).
(The wheel will be automatically downloaded from the Python Package Index.)
The PyQt5 wheel includes the necessary parts of the LGPL version of Qt. There is no need to install Qt yourself.
(The required
sip
is packaged as a separate wheel and will be downloaded and installed automatically.)Note:
If you get an error message saying something as
then you are probably using an unsupported version of Python.
Mainly I use the following command under the
cmd
And it works with no problem!
First try this in your Windows cmd window:
If that is successful, it will look something like this:
If that did not work, you might try this link from SourceForge.
PyQt5 .exe installers for Windows
How to find the installer that's right for you?
First, determine what version of Python you have and whether you have 32-bit or 64-bit Python. Next, open one of the directories. I'm on Python 3.5 64-bit so I'm looking for a .exe with those specs. When you open a directory on SourceForge, you will see some directories with ONLY .zip or .tar.gz. That's not what you're looking for. A good indication of which directory you should click is given by the "Downloads/Week" column. I'll open the PyQt-5.6 directory in my case.
Here we notice some .exe files:
I know these are Python 3.5 by
Py3.5
in the file name. I am also looking for the 64-bit version so I'll downloadPyQt5-5.6-gpl-Py3.5-Qt5.6.0-x64-2.exe
. Final answer!Note: if you try to install a version that's not compatible with your system, a dialog box will appear immediately after running the .exe. That's an indication that you've chosen the wrong one. I'm not trying to sound like a dbag... I did that several times!
To test a successful install, in your Python interpreter, try to import:
One of the most (probably the most) easiest way to install site-packages like PyQt5 is installing one of the versions of Anaconda. You can just install many of site-packages by installing it. List of avaliable site-packages with Anaconda versions can be checked here.
For example: