2

Whenever I try to open guake it shows the following error

Traceback (most recent call last):
  File "/usr/bin/guake", line 24, in 
    import pygtk
ImportError: No module named pygtk

How to remove this error and make guake run properly ?

tusharmakkar08
  • 1,805
  • 1
  • 22
  • 23
  • 2
    install the python gtk module. – jordanm Apr 16 '13 at 03:41
  • How to do so ? I tried using it but it is showing E: unable to locate package pygtk – tusharmakkar08 Apr 16 '13 at 04:46
  • The package is `python-gtk2`. – jordanm Apr 16 '13 at 04:54
  • It is already installed on my computer.It is showing : Reading package lists... Done Building dependency tree Reading state information... Done python-gtk2 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. – tusharmakkar08 Apr 16 '13 at 04:55
  • Try `python2-gtk2`, maybe `python-gobject-2`. Python version might be wrong against the module version. Alternatively, you may want to check which package provides `pygtk.py` and install more of them: `sudo apt-get install apt-file`, `sudo apt-file update`, `apt-file search pygtk.py`. Try running `python` and typing `import pygtk` on your own to check if it works. – TNW Apr 16 '13 at 06:14
  • Nothing is working even after trying all the apt-get commands . @TNW: When I do apt-file search pygtk.py , I get : dreampie: /usr/share/dreampie/dreampielib/gui/load_pygtk.py python-gobject-2: /usr/lib/python2.7/dist-packages/pygtk.py python-gobject-2: /usr/share/pyshared/pygtk.py And by running python and then trying import pygtk It still shows : Traceback (most recent call last): File "", line 1, in ImportError: No module named pygtk – tusharmakkar08 Apr 16 '13 at 06:43
  • I am getting this error again and again with other modules also . Please help – tusharmakkar08 Apr 28 '13 at 08:11

1 Answers1

1

I think your system default python is Python3.x, type

$ which python
$ which guake
/usr/bin/guake

And change the #! /usr/bin/python in /usr/bin/guake to #! /usr/bin/python2.7. Note that guake can be runed just on Python2.x, and the pygtk is just support Python2.x.

GoingMyWay
  • 173
  • 1
  • 2
  • 8