PDA

View Full Version : [SOLVED] Need Help Compiling PyQt4 With Python 3



dniMretsaM
April 12th, 2012, 04:44 PM
I first attempted to use PyQt4 with Python 3 and got an error about missing modules. So I went digging and found that you need Qt 4.7 or higher (I wos using 4.6.x). So I downloaded the latest Qt (4.8.1) and compiled it. It installed to /usr/local/Trolltech/Qt-4.8.1/. I then attempted to compile sip and PyQt4 with the commands

python3 configure.py
make
sudo make installSip installs fine, but PyQt doesn't configure. I get this error message:

sip: QDBusPendingCall has not been definedSo how can I get this to work? If at all possible, I would really like to avoid recompiling Qt. It took well over 12 hours. But I will do it if it's necessary.

Note that this is on a Crunchbang 10 "Statler" with backports. However, since #! and Ubuntu are very similar, I thought I might be able to get some help without having to join yet another forum.

dniMretsaM
April 16th, 2012, 09:00 PM
Bump. Any help?

SevenMachines
April 16th, 2012, 09:28 PM
I'd guess that its because you're installing your local qt version to /usr/local/Trolltech/Qt-4.8.1/ but then just calling the default configure python3 configure.py. In other words, the configure will use the system version of qmake, and so qt4, rather than the new version you want it to.
Try first finding the path of the new 4.8 version of qmake with

$ find /usr/local/Trolltech -name 'qmake'then send this path as a parameter to configure

$ python3 configure.py -q /usr/local/Trolltech/something/qmakeIn this case I imagine the combined effort would probably work too

$ python3 configure.py -q ` find /usr/local/Trolltech -name 'qmake' `

dniMretsaM
April 16th, 2012, 09:37 PM
Thanks, testing it out now. Will report back.

dniMretsaM
April 17th, 2012, 01:57 AM
Worked like a charm. Thanks!