[PyKDE] PyKDE-3.11rc1 release

Jim Bublitz jbublitz at nwinternet.com
Mon May 10 18:11:00 BST 2004

On Sunday May 9 2004 23:45, Simon Edwards wrote:
> On Sunday 09 May 2004 17:12, Simon Edwards wrote:
> > [sbe at f53113 /home/sbe/devel/guidance/displayconfig]$ python
> > Python 2.3.3 (#2, Feb 17 2004, 11:45:40)
> > [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2
> > Type "help", "copyright", "credits" or "license" for more
> > information.
> >
> > >>> import kdeui
> >
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File "/usr/lib/python2.3/site-packages/kdeui.py", line 67,
> > in ? import libkdeuic
> > ImportError: libkdefxcmodule.so: cannot open shared object
> > file: No such
> file
> > or directory

> objdump and ldd tell me that libkdeuicmodule.so is linked to
> libkdefxcmodule.so. But my runtime linker isn't configured to
> search in /usr/lib/python2.3/site-packages/ so it can't find
> libkdefxcmodule.so.

> Does Mdk 9.2 really have /usr/lib/python2.3/site-packages/ in
> ld.config?

ld.so.conf? No.

> Couple of solutions:

> 1) modify ld.config. (=> makes packaging tricker)

Do you mean modify ld.so.conf or run ldconfig? I don't think the 
first is good practice - too much potential damage to someone's 
setup. PyKDE-3.8 used to do the latter, but that was for 
libpythonize and panel applet stuff (which aren't in PyKDE any 

> 2) modify the kde*.py files to import the library dependancies
> first. (make kdeui.py import kdefx, and let python load
> libkdefxcmodule.so directly).

That's possible for sip 3.10.1, but there are no *.py files in 
sip 4.0.

> 3) modify the kde*.py to twiddle the LD_LIBRARY_PATH
> environment var with the extra search path. (=> is
> LD_LIBRARY_PATH linux specific?)

Most distros don't set this anymore. Modifying the environment 
from a script is somewhere between tricky and impossible in my 

> If Mandrake 10 is the odd one out here and all of the other
> distros have /usr/lib/python2.3/site-packages/ in their
> ld.config, then 1) is probably the winner.

It's Python that's failing to load libkdefxcmodule.so though, not 
the Linux loader (directly). I would think PYTHON_PATH or 
sys.path should cover locating this lib but I may be wrong on 
that (that's how /site-packages is "known" in the first place. 
It might be the difference between importing a script and 
loading a .so file.

If modifying the k*.py files in /site-packages will solve the 
problem, I can do that. I'd prefer to limit it to those which 
are absolutely necessary if you can provide me with that info 
(when I've had similar problems in the past, it's usually not 
required every module to be loaded to solve the problem). I 
don't recall that running ldconfig would fix this when I've had 
the problem in the past, but I never tried modifying ld.so.conf 
for this.


More information about the PyQt mailing list