[PyKDE] Qt 3.0.4 and PyQt-3.2.4 install trouble

Joe Jones joe at thesloth.fsnet.co.uk
Mon Jun 10 23:57:33 BST 2002


On Saturday 08 June 2002 8:49 pm, Hans-Peter Jansen wrote:
> Hi,
>
> just tried to install $subject. While building Qt and PyQt was successful,
> PyQt throws this error message on make install:
>
> /bin/sh ../mkinstalldirs /usr/lib/python2.1/site-packages
>  /usr/bin/install -c -m 644 qt.py /usr/lib/python2.1/site-packages/qt.py
> make  install-data-hook
> make[3]: Entering directory `/home/hp/Downloads/qt/PyQt-3.2.4/qt'
> (cd /tmp;
> PYTHONPATH=/usr/lib/python2.1/site-packages:/usr/lib/python2.1/site-package
>s /usr/bin/python -c "import qt")
> Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "/usr/lib/python2.1/site-packages/qt.py", line 49, in ?
>     import libqtc
> ImportError: /usr/lib/python2.1/site-packages/libqtcmodule.so: undefined
> symbol: static_QUType_ptr

Hi

Although my error message was different, I think I had the same problem. PyQt 
has been linked against an old version of Qt, to confirm this do 
ldd /usr/lib/python2.1/site-packages/libqtcmodule.so ;
If you see a different version of Qt than what you thought you had linked 
against, then you have the same problem. Although I had $QTDIR correct in the 
shell I did ./configure ; make ; in I then did su ; make install ; and my 
/root/.bashrc exported the wrong $QTDIR. Even after I had changed this no 
amount of make uninstall ; make install ; would make things better.

Here is the list of things I did before I got things working.
1)Delete all PyQt and sip files from /usr/lib/python2.1/site-packages/ 
including eric/ .
2)If you have ever installed a version of sip less than 3.1 there will be 
files in /usr/local/lib and /usr/local/include , get rid of these, there is 
also a file in /usr/local/bin , I got rid of this as well, but it is not 
mentioned in the sip README file.
3)The PyQt README file mentions version prior to 2.0, but I don't know where 
they installed.
4)chmod 000 the old version of Qt that was causing problems. Remember that 
software using it wont work.
5)Delete the source trees of PyQt and sip, assuming you built in the source 
tree, and create them again from the original .tar.gz files.
6)Start all over again but this time using ./configure --with-qt-dir=$QTDIR ; 
for both sip and PyQT.

I doubt all of this was necessary, but PyQt takes such a long time to compile 
I was taking no chances.

I hope this is usefull to you.

It would be good if someone could tell me at what point Qt is linked to, and 
how it is decided which Qt to link to? I notice that make install ; uses 
libtool .

Joe Jones joe at thesloth.fsnet.co.uk




More information about the PyQt mailing list