Bug#489955: ImportError: dynamic module does not define init function (initgtk)

Manuel Metz mmetz at astro.uni-bonn.de
Fri Jul 18 06:36:05 UTC 2008


Jason Armstrong wrote:
> Thanks for the feedback.
> 
> Is there a way to know which file python was trying to load that
> gave the actual error message?
> 
> Also, how can I see my python path?

Yes, you can: in a python shell
 >>> import sys
 >>> sys.path

> On my machine, the following gtk.so files are found:
> 
> /usr/lib/python-support/python-gtk2/python2.4/gtk-2.0/gtk/_gtk.so
> /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/gtk.so

AHA: There it is !!!

> /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/_gtk.so
> /usr/lib/rep/i486-pc-linux-gnu/gui/gtk-2/gtk.so
> /var/lib/python-support/python2.4/gtk-2.0/gtk/_gtk.so
> /var/lib/python-support/python2.5/gtk-2.0/gtk/gtk.so

And this one !!!

   Removing these two symbolic links should solve your problem. So leave 
the real files where they are, but move the two symbolic links called 
"gtk.so" out of the way.

   (I don't think that the file gtk.so in ../rep/.. causes any problem, 
since this path should not be in the python path)


> /var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so
> 
> Most of them are symlinks to other files:
> 
> /usr/lib/python-support/python-gtk2/python2.4/gtk-2.0/gtk/_gtk.so
>   => Real file from python-gtk2
> 
> /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/gtk.so
>   => symlink to
>   /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/_gtk.so
> 
> /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/_gtk.so
>   => Real file from python-gtk2
> 
> /usr/lib/rep/i486-pc-linux-gnu/gui/gtk-2/gtk.so
>   => Real file from rep-gtk
> 
> /var/lib/python-support/python2.4/gtk-2.0/gtk/_gtk.so
>   => symlink to
>   /usr/lib/python-support/python-gtk2/python2.4/gtk-2.0/gtk/_gtk.so
> 
> /var/lib/python-support/python2.5/gtk-2.0/gtk/gtk.so
>   => symlink to
>   /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/gtk.so
> 
> /var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so
>   => symlink to
>   /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/_gtk.so
> 
> I have tried moving the 'real files' temporarily out of the way, but
> this didn't help either.
> 
> Has the
> /usr/lib/python-support/python-gtk2/python2.5/gtk-2.0/gtk/_gtk.so
> file maybe been overwritten somehow?
> 






More information about the pkg-gnome-maintainers mailing list