[PyKDE] PyKDE on Debian

Jim Bublitz jbublitz at nwinternet.com
Sat Aug 9 00:31:00 BST 2003


On Friday August 8 2003 12:34, Peter Clark wrote:
> This is just to relate my experience building PyKDE (3.7-3) on
> Debian (unstable). Assuming that PyQt is already installed,
> the only additional packages you should require are:
>
> 	apt-get install sip python2.2-sip-dev libdcopc1 libdcopc-dev
>
> (There might be more that I had installed for other reasons,
> but don't know about, however.)
> 	The build.py script requires the following flags:
>
> python build.py -q /usr -i /usr/include/qt3 -v
> /usr/share/sip/qt
>
> 	I compiled everything as root (may I ask why?), 

I did a patch to compile as a user but nobody liked it (this 
applies to sip and PyQt as well). The basic reason is that 
python/site-packages isn't world-writable, if I recall 
correctly. 

> per the
> README, and then ran 'checkinstall' to create a .deb package
> and install it. Unfortunately, trying the example programs
> inevitably fails with a message like this:
>
> Traceback (most recent call last):
>   File "uisampler.py", line 6, in ?
>     from kdeui import KMainWindow, KListView
>   File "/usr/lib/python2.2/site-packages/kdeui.py", line 67,
> in ? import libkdeuic
> ImportError:
> /usr/lib/python2.2/site-packages/libkdeuicmodule.so: undefined
> symbol: sipName_getFormat
>
> What is 'sipName_getFormat' and how do I go about fixing this?

Can you run importTest.py (in the top level PyKDE directory) ? I 
expect it will fail the same way.

The only occurance of 'getFormat' (with 'sipName_' prepended or 
not) I could find on my system was in PyQt/sip/qtextedit.sip:

	// These are undocumented and marked as "don't use".
	//virtual bool getFormat(int,int,QFont *,QColor *,
                                            VerticalAlignment *);
	//virtual bool getParagraphFormat(int,QFont *,QColor *,
	//				VerticalAlignment *,int *,
	//				QStyleSheetItem::DisplayMode *,
	//				QStyleSheetItem::ListStyle *,
	//				int *);

The problem you're seeing is that none of the libs are providing 
'sipName_getFormat'. The 'sipName_' part means that sip has seen 
the symbol getFormat somewhere, and seems like it had to be in 
PyQt. The first thing I would check is qtextedit.sip and see if 
yours corresponds to the above. I can't find anything in KDE, 
PyQt or PyKDE referencing getFormat on my system, so I expect it 
has to be a Debian difference, or .....

Make sure you have sip 3.6 or 3.7 (sip -V) and PyQt 3.6 or 3.7 - 
sip versions (what the 3.6 or 3.7 means everywhere) have to be 
the same for everything. PyQt 3.5 had getFormat enabled. PyQt 
3.5 and/or sip 3.5 won't work with this version of PyKDE.

You can check your PyQt version in the Python interpreter:

>>> from qt import PYQT_VERSION_STR
>>>PyQT_VERSION_STR
'3.7'

If PYQT_VERSION_STR isn't available, your PyQt is too old. 
build.py for PyKDE checks this, but only when trying to figure 
out where PyQt's sip files are located, and you're specifying 
that with a switch so the check isn't done.  build.py should 
check all that version stuff, as it's a constant source of 
problems - added to 'todo' list.

I think Ricardo has 3.6 or 3.7 versions of sip and PyQt packaged 
for Debian.

Jim




More information about the PyQt mailing list