G
G
germn2014-05-13 06:43:17
Qt
germn, 2014-05-13 06:43:17

How to compile PyQt 5.2.1 under Windows?

I'm trying to compile PyQt5.2.1 under Windows 7 x86, python 3.3 using this manual .
What I did:
1) Download sip, PyQt sources from here
2) Installed "Qt 5.2.1 for Windows 32-bit (VS 2012, 541 MB)" and added "c:\Qt\Qt5.2.1\5.2.1\msvc2012 \bin\" in PATH
3) In VS2012 x86 Native tools ran commands for sip and for PyQt:

python configure.py
nmake
nmake install

In "c:\Python33\Lib\site-packages\PyQt5\" got: "uic" folder, "__ init __.py" file and about 26 ".pyd" files.
I run:
from PyQt5 import QtCore
help(QtCore)

And I get the error "SystemError: error return without exception set" (on the first line).
What am I doing wrong?
What can you advise?
Thanks for the help.
PS I know about installers, but there is no version of Qt5.2.1-x86.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FireFly2045, 2014-06-06
@germn

Now installing PyQt5.3 under Windows 8.1 faced the same problem, the following addition to the PATH variable helped:
More details on how to install:
1) First I installed python
2) Then qt with the environment you need, I needed msvc2013 (I have visual stuidio 2013)
3) Opened the Developer Command Prompt for VS2013
4) Build sip, everything should go without problems

python configure.py
nmake
nmake install

5) Then add to the PATH variable (via Control Panel \ All Control Panel Items \ System -> Advanced System Settings -> Environment Variables):
now you can build PyQt5
again:
python configure.py
nmake
nmake install

6) If an error pops up:
Then you add it to PATH
and everything will work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question