[SOLVED] Re: [PyQt] Can't load custom python plugins in qt4 designer

David Boddie dboddie at trolltech.com
Tue Jun 2 14:43:34 BST 2009

On Tuesday 02 June 2009, Michael Thompson wrote:

> I ran an strace and grepped for plugins and python and noticed the following
> possibly missing files.

Ah, I should have thought of using strace...

> stat64("/usr/share/doc/python-qt4-doc/examples/designer/plugins/PyQt4",
> 0xbf9f4f74) = -1 ENOENT (No such file or directory)
> open("/usr/share/doc/python-qt4-doc/examples/designer/plugins/PyQt4.so",
> O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
> open("/usr/share/doc/python-qt4-doc/examples/designer/plugins/sip.py",
> O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
> open("/usr/share/doc/python-qt4-doc/examples/designer/plugins/sip.pyc",
> O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

I'm not sure these failures are the cause of the problem. I see the same
failed calls to open() in my output. However, if you look through the
output, you should see that some of these files are found in other places,
such as in the Python installation's site-packages directory.

> I then installed the following additional packages and now it works, so I
> think there is a missing dependency amongst the list below.
> sudo apt-get install python-qt-dev python-qt4-dev python-sip4
> python-sip4-dev

I would be surprised if the python-sip4 package was missing - if I try to
remove it, apt-get tells me that it will also remove python-qt4, so the
plugins example wouldn't have run without it. I don't have any of those
-dev packages installed, so it would be strange if our systems behaved
differently in this respect.

Could it be that your system was finding an orphaned sip.so library
somewhere? Did you install Ubuntu from scratch or did you upgrade from a
previous version?

> Should I file a bug (where)?

I'm thinking that it could be an Ubuntu packaging bug. Perhaps you could
report it to the package maintainers. If they're reading this then perhaps
they could say if it's a packaging bug...

> Thanks (for re-assuring me it worked on your end).

No problem, though it seems that there are now more questions than answers.

David Boddie
Senior Technical Writer
Nokia, Qt Software

More information about the PyQt mailing list