Comment 2 for bug 371017

Revision history for this message
David Racine (bass-dr) wrote :

Ok I found a way to fix this, and the reason why it happened, maybe it will help someone!

the problem was: when I made my synlink with

sudo update-alternatives --install /usr/bin/python python python2.5 10

update-altertative didn't write this path to the synlink, but: /etc/alternatives/python (I don't know why...) this is what confused python. In /usr/share/pycentral-data/pyversions.py, the script that checks if the right version of python is used, they search for python2.5 in "os.readlink" the return of readlink was: /etc/alternatives/python... no python2.5 in this string!

So how to fix this:

sudo python #open python in super-user mode
import os #we are in python now, so this import the os functions
os.unlink('/usr/bin/python') #remove the old link
os.symlink('/usr/bin/python','/usr/bin/python2.5') #make the new link, this is made by python itself, so it must work!!

this works fine for me, python now installs fine, and works fine too (with version 2.5 though...)