pyGtk: Gtk missing error when get version
Asked Answered
G

0

2

When I startup /usr/bin/sniff which is a GUI monitor of dogtail I got below error:

Traceback (most recent call last):
  File "/usr/bin/sniff", line 13, in <module>
    gi.require_version('Gtk', '3.0')
  File "/usr/local/lib/python2.7/site-packages/gi/__init__.py", line 48, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available

And I execute the command python -c 'from gi.repository import Gtk' I got:

ERROR:root:Could not find any typelib for Gtk
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name Gtk

Any help? Thanks.

System: CentOS release 6.2(Final)

Python-2.7.3

Gatling answered 25/6, 2015 at 2:55 Comment(2)
look at this thread #25037506Internecine
On Mac OS X you need to install two packages to avoid this error: brew install gtk+3 pygobject3.Rutherfordium

© 2022 - 2024 — McMap. All rights reserved.