ImportError: No module named gi.repository
Question: I'm trying to launch python script on Ubuntu 10.04:

    
    
    from gi.repository import Nautilus, GObject

It doesn't work:

    
    
    
        Traceback (most recent call last):
          File "script.py", line 1, in 
            from gi.repository import Nautilus, GObject
           ImportError: No module named gi.repository
    
    

I installed python-gobject-dev, python-gobject, python-nautilus, but it didn't
help. Has anyone had this problem?


Answer: 10.04? That's pre-GNOME 3, so the preferred Python bindings were based on
PyGTK, not PyGObject. You need to either use the (obsolete) PyGTK bindings or
upgrade to a newer OS.

