[PyQt] problem running pyqt on xubuntu

Mark Summerfield list at qtrac.plus.com
Sun Oct 21 08:11:11 BST 2012


Hi Baz,

On Sun, 21 Oct 2012 00:44:58 +0100
Baz Walter <bazwal at ftml.net> wrote:
> On 20/10/12 08:11, Mark Summerfield wrote:
> > Hi,
> >
> > I have built local versions of Qt 4.8.3, Python, SIP, and PyQt on an
> > Xubuntu machine which has Qt 4.8.1 as its system Qt:
> >
> > $ cd qt483src
> > $ ./configure -prefix ~/opt/qt483
> > $ make && make install
> >
> > $ cd py33src
> > $ ./configure --prefix ~/opt/py33
> > $ make && make install
> >
> > $ cd sip414src
> > $ ~/opt/py33/bin/python3 configure.py
> > $ make && make install
> >
> > $ cd pyqt495src
> > $ ~/opt/py33/bin/python3 configure.py -q ~/opt/qt483/bin/qmake
> > $ make && make install
> >
> > $ ./opt/py33/bin/python3 mypyqtapp.pyw
> > Cannot mix incompatible Qt library (version 0x40801) with this library
> > (version 0x40803) Aborted (core dumped)
> >
> > So clearly, despite trying to build using my local Qt, PyQt seems to be
> > looking at the system Qt.
> >
> > Is there a solution for this?
> 
> One of the simplest solutions is to use LD_LIBRARY_PATH.
> 
> Create a wrapper "pyqt483" script like this:
> 
>      #!/bin/sh
> 
>      export LD_LIBRARY_PATH="path/to/qt4/lib"
> 
>      exec "path/to/bin/python" "$@"
> 
> Then you can test your pyqt apps like this:
> 
>      $ pyqt483 mypyqtapp.pyw

I will try that next week.

But I still don't understand why, if I use -q when I build PyQt, it
makes any reference to another Qt at all.

So, ISTM, that this is a PyQt bug...

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Programming in Python 3" - ISBN 0321680561
            http://www.qtrac.eu/py3book.html


More information about the PyQt mailing list