Python version

Derek Broughton news at pointerstop.ca
Thu Jun 14 13:08:11 UTC 2007


Neil Winchurst wrote:

> On Wed, 13 Jun 2007 20:22:42 -0300
> Derek Broughton <news at pointerstop.ca> wrote:
>> > Either version seems to work OK, so I am assuming that I
>> > have both versions installed and they both work. No, I have no idea how
>> > that happened.
>> 
>> That happened because some  apps ask for python2.4 by name, so Ubuntu
>> couldn't just force everything to use python2.5.
>> 
> Interesting, but that raises some questions.
> 
> Are you telling me that when I installed Edgy I actually got two
> versions of Python without even knowing? If so then that raises more
> questions.

Almost certainly.
> 
> Why did nothing explain that to me at installation?

Why?  In the first place, "ubuntu" doesn't know what apps are going to need
python2.4 and what apps need python2.5 - so the apps specify their own
dependency.  There does seem to be a small bug in the python packaging, as
it apparently doesn't use the "update-alternatives" system
(update-alternatives keeps a database of redirections for this sort of
package, and so you would see /usr/bin/python symlinked
to /etc/alternative/python, which in turn would symlink
to /usr/bin/python2.5).

> Why does 'python' point to the older version?

At a guess because python2.4 got installed _after_ 2.5.

> If I change the link as suggested so that 'python' points to v2.5 will
> that cause problems with programs that need v2.4?

It _shouldn't_, but I wouldn't guarantee it.  Programs that really need 2.4
should use a "#! /usr/bin/python2.4" shebang, rather
than "#! /usr/bin/python", but there could be some that are buggy.
> 
> Or do such programs really need version >= 2.4, in which case changing
> the link will be fine?

Almost everything should need >= some version.  Not much actually disappears
from version to version.

> It seems that the only way to get the latest version of Gramps to
> install happily is to give it python2.5, but I don't want to cause
> problems for other programs.

I have gramps, and I have python2.5 and python2.4.  Python links to 2.5.  No
problems here.
-- 
derek





More information about the kubuntu-users mailing list