28 Apr 2008 zeenix   » (Journeyer)

whats wrong with my python setup?

Can any python guru out there explain whats going on here:


$ /usr/bin/gnome-about
Traceback (most recent call last):
File "/usr/bin/gnome-about", line 35, in ?
import gtk
ImportError: No module named gtk

$ head -n 1 /usr/bin/gnome-about
#!/usr/bin/python

$ head -n 36 /usr/bin/gnome-about|tail -n +29

import pygtk
pygtk.require ('2.0')

import gobject
from gobject.option import OptionParser, make_option
import gtk

$ /usr/bin/python
Python 2.4.5 (#2, Mar 12 2008, 00:15:51)
[GCC 4.2.3 (Debian 4.2.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> import gtk
>>>

$ /usr/bin/python
Python 2.4.5 (#2, Mar 12 2008, 00:15:51)
[GCC 4.2.3 (Debian 4.2.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> pygtk.require ('2.0')
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named gtk
>>>

UPDATE: Thanks to Karl-Lattimer, the problem was solved by:

# rm /usr/bin/python
# ln -s /usr/bin/python2.5 /usr/bin/python

Syndicated 2008-04-28 21:25:00 (Updated 2008-04-29 14:41:14) from zeenix

Latest blog entries     Older blog entries

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!