Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
Traceback (most recent call last):
  File "/usr/bin/caffeine", line 40, in <module>
    import caffeine
  File "/usr/lib64/python2.6/site-packages/caffeine/__init__.py", line 23, in <module>
    from gi.repository import Gtk, Gio
ImportError: No module named gi.repository

This is what I get after installing caffeine.

rpm -qa | egrep -i 'caffeine|gobject'

How can I install it? what am I missing?


share|improve this question

Your pygobject is too old. gi.repository used to be provided by PyGI. It was merged into pygobject, but not until 2.21.4, so you either need to update pygobject or install PyGI (probably the former)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.