I installed gtk+ on my Ubuntu 13.10 successfully(apparently!) using jhbuild following this link: http://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html
but when i run the following simple program:
#!/usr/bin/python from gi.repository import Gtk win = Gtk.Window() win.connect("delete-event", Gtk.main_quit) win.show_all() Gtk.main() i get this error:
Gtk-Message: Failed to load module "overlay-scrollbar" Gtk-Message: Failed to load module "unity-gtk-module" Gtk-Message: Failed to load module "canberra-gtk-module" Traceback (most recent call last): File "intro.py", line 4, in <module> win=GtkWindow() NameError: name 'GtkWindow' is not defined On searching around a bit , i found these similar questions:
https://askubuntu.com/questions/342202/failed-to-load-module-canberra-gtk-module-but-already-installed https://askubuntu.com/questions/208431/failed-to-load-module-canberra-gtk-module?rq=1
but i still get the error.
and these:
Python Gtk+ development in Linux using Eclipse + PyDev, Unresolved import: Gtk PyCharm can not resolve PyGObject 3.0, but code runs fine
don't really give a solution.
How can i fix this?
UPDATE 1: So, apparently the error was due to GtkWindow instead of Gtk.Window in the code, but even after correcting it , the same warnings are displayed (although, now i don't get the error and get the correct output)