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
caffeine
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'
caffeine-2.4.419-1.el6.nux.noarch
pygobject2-2.20.0-5.el6.x86_64

How can I install it? what am I missing?

https://launchpad.net/caffeine

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

 
discard

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.