Sunday, May 4, 2008

python strikes back

The joy of getting my python problems fixed on my debian testing were short lived. This time when i ran `apt-get dist-upgrade`, apt failed saying:

ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.4
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

So removed the link to python2.5 and recreated it but this time pointing to pythong2.4. It should fix the problem, right? No! here is what apt says now:

ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.5


Michael Banck said...

Well, Debian changed the default python in lenny to 2.5 last week, so you've hit a very rare "race condition" where before apt-get dist-upgrade python was pointing to python2.4, and afterwards to 2.5, I guess. Apparently the python default got updated between the error and apt finishing, so you saw the error again. Or something.

zeenix said...

Just to be sure, the second time i did `apt-get -f install`. No matter how many times i run this command, i get the same kind of error. Any hint/help is greatly appreciated since seems many important gnome apps are python based.

Danny said... may help you

Changing stuff in /usr/bin makes a long-time debian user like me kind of twitchy -- you're asking for trouble there.

Rodrigo Novo said...

# update-alternatives --config /usr/bin/python

is (probably) your friend.

-- Rodrigo

zeenix said...

# update-alternatives --config /usr/bin/python
No alternatives for /usr/bin/python.

Note that it's not that this happened after I first deleted and linked '/usr/bin/python' myself for the first time last Thursday but there was no alternatives available for python at before that either.

Anonymous said...

If you feel the need, please come to D501 today and scream at me.