[PyKDE] PyQt - undefined symbol

Jim Bublitz jbublitz at nwinternet.com
Sat Apr 19 04:45:00 BST 2003


On 19-Apr-03 Erik Dahlgren wrote:
> I am trying to install PyKDE 3.5-2 but I am having some problems.
> When running the build.py script  I get 
 
> Error: Couldn't import qt module from PyQt -- from line 725 in
> build.py
 
> When trying to import qt  in python I get

> ImportError: /usr/lib/python2.2/site-packages/libqtcmodule.so:
> undefined symbol: PyUnicodeUCS2_FromUnicode
 
> I didn't have any problems when installing PyQt (at least I don't
> think so). My system is RH8 mostly updated to RH9 with qt and
> kde compiled from Red Hat source rpms.  I have qt 3.1.2-0.8x.1
> and kde 3.1.1-0.8x.1
 
> Any help would be appreciated!

You definitely have a problem with PyQt (or less likely Python).
PyUnicodeUCS2_FromUnicode is a symbol from the Python libs and
should be there in any 2.2 version. The likeliest source for this
kind of problem is some kind of version mismatch or older libs
still around. Check that sip and PyQt were compatible versions (eg
sip 3.5 and PyQt-x11-gpl-3.5), that you don't have older versions
of PyQt in /usr/lib/python2.2./site-packages (check the dates), run
sip -V to see what sip version you're building with. As a last
resort you can do:
 
    ldd /usr/lib/python2.2/site-packages/libqtcmodule.so

and see where it thinks it's going to find libpython.

Also, if you built PyQt and/or sip from the snapshots, PyKDE at
present won't build, but you haven't reached the point yet where
you'd have that problem. build.py is failing when it tries to
import qt to do some testing/discovery.

It would help to know what sip and PyQt versions you're using, but
the problem is with your PyQt installation. You should be able to
run the Python interpreter and do:

>>> import qt

and my guess is that that will fail also.

Jim




More information about the PyQt mailing list