[PyKDE] Running PyQt3 and PyQt4?

Jan Ekholm chakie at smultron.net
Thu Mar 9 10:26:01 GMT 2006


Hi,

I'm sorry if this is a FAQ, if so, please point me towards what I should
search for in the archives.

I've been using PyQt3 for years and am very happy with it. As a result
we have a number of apps that use it that we need daily. I want to try
out PyQt4 as I use Qt4 in my C++ work, but it doesn't seem to be that
straightforward.

I assume I have to install a SIP snapshot from here:

    http://www.riverbankcomputing.com/Downloads/Snapshots/sip4/

Compiling that is no problem, but it seems to want to install the sip.so
library into /usr/lib/python2.4/site-packages/sip.so and clobber my
existing SIP for my PyQt3 installation. So, I install SIP4 into some
other directory by giving configure.py some parameters. That's all fine
and seems to work well, my old PyQt3 apps still work after installing
SIP4. :)

Now comes PyQt4, downloaded from here:

    http://www.riverbankcomputing.com/Downloads/Snapshots/PyQt4/

Running "python configure.py" gives me this error:

    "Error: This version of PyQt requires SIP v4.4.0 or later"

I guess it finds my old SIP3 installed in
/usr/lib/python2.4/site-packages/, so I should just need to get
configure.py to load the new SIP4 instead that is installed elsewhere.
But how to do that? I tried with:

    % export PYTHON_PATH=/opt/sip-20060308/
    % python configure.py

Same error. So apparently I do it somehow wrong or use the entirely
wrong environment variable? As apparently configure.py accepts no
commandline parameters to set the parameters I guess the best way is
to hack configure.py to get it to add my "/opt/sip-20060308" to the
module path.

Or am I going about this the entire wrong way? The point is that it's
probably no problem at all if I overwrite my PyQt3 installation, but that
is no option at the moment. How have you others done it? Or maybe there
even are [K]Ubuntu packages somewhere that work alongside PyQt3?

Best regards,
    Jan Ekholm

-- 
Jan Ekholm
jan.ekholm at smultron.net





More information about the PyQt mailing list