PDA

View Full Version : Parallel Python 2.5 installation



burkina76
10th October 2007, 04:09 PM
Ciao,

I've installed python 2.5.1 on my Fedora 6.
In order not to mess things up, I've installed a parallel version of this python in:

/usr/local/bin/python2.5

while leaving the standard python 2.4.4 in

/usr/bin/python

The problem raised when I tried to install pygtk for the new version.
Before configuring pygtk, I changed the PYTHON variable to point to the new version:

export PYTHON=/usr/local/bin/python2.5

and the configure script correctly detect the new version of python. I installed it and then gave it a try.
However, it doesn't work. If I simply call python:

/usr/local/bin/python2.5
Python 2.5.1 (r251:54863, Oct 10 2007, 14:40:41)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gtk

If I manually set the right path:

export PYTHONPATH=/usr/local/lib/python2.5/site-packages/gtk-2.0/
/usr/local/bin/python2.5
Python 2.5.1 (r251:54863, Oct 10 2007, 14:40:41)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 38, in <module>
import gobject as _gobject
ImportError: No module named gobject

So, the module is found, but not gobject, which should be part of pygtk.

Two pieces of information:

-At the end of the configure, I get:

checking for GLIB - version >= 2.8.0... yes (version 2.12.9)
checking for PYGOBJECT... yes
checking for ATK... yes
checking for PANGO... yes
checking for PYCAIRO... yes
checking for PANGOCAIRO... yes
checking for GTK... yes
checking for GTK210... yes
checking for LIBGLADE... yes
checking for GTKUNIXPRINT... yes
checking for GDK target... x11

.......

The following modules will be built:

atk
pango
pangocairo
gtk with 2.10 API
gtk.glade
gtk.unixprint

-I have pygobject related files in the root tree /usr (and, indeed, the gtk module is properly installed with the default python), but I have nothing of this kind in the /usr/local tree.

Do you have some ideas?

Just to inform you, I need the new python and pygtk to install sms capabilities to Skype. If you know another way to do that, it's the same...

Stefano