Ubuntu – Python 2.7 ImportError: No module named repository

14.04gtkpython

I'm completely clueless. I uninstalled, and re installed gi and python2.7. Do you guys have any ideas?

~ > /usr/bin/python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> import gi.repository
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named repository

Thank you!

Best Answer

You need to install the following package instead:

sudo apt-get install --reinstall python-gi

This package contains the Python 2.x binding generator for libraries that support gobject-introspection, i. e. which ship a gir1.2-- package. With these packages, the libraries can be used from Python.

Related Question