[PyKDE] PyQt - undefined symbol
Phil Thompson
phil at river-bank.demon.co.uk
Sat Apr 19 09:15:01 BST 2003
On Saturday 19 April 2003 2:42 am, 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!
To quote the Python source (Include/unicodeobject.h):
/* Unicode API names are mangled to assure that UCS-2 and UCS-4 builds
produce different external names and thus cause import errors in
case Python interpreters and extensions with mixed compiled in
Unicode width assumptions are combined. */
In other words your Python interpreter has been built with Py_UNICODE_WIDE
defined, but PyQt has been built without it defined. As PyQt picks the
definition up from your Python installation automatically (by #including
Python.h), it implies that your Python installation is inconsistent.
Phil
More information about the PyQt
mailing list