I'm using linux gentoo and i want to install python2.5 but it's a problem. emerge -av python shows

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] dev-lang/python-3.1.2-r3 [3.1.1-r1] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode%*) xml -build -doc -examples -sqlite* -tk -wininst (-ucs2%)" 9,558 kB
[ebuild     U ] app-admin/python-updater-0.8 [0.7] 8 kB

and there are ebuild for more versions:

# ls /usr/portage/dev-lang/python
ChangeLog  
files  
Manifest  
metadata.xml  
python-2.4.6.ebuild  
python-2.5.4-r4.ebuild  
python-2.6.4-r1.ebuild  
python-2.6.5-r2.ebuild  
python-3.1.2-r3.ebuild

How to choose ebuild that I want? (python-2.5.4-r4)

updated

@Ophidian emerge -av =python-2.5.4-r4 works.. Thanks

link|improve this question

I updated my answer. I don't have a gentoo box close at hand to test the specific commandlines. – Ophidian May 27 '10 at 13:39
feedback

4 Answers

up vote 3 down vote accepted

I believe Python is slotted, so you should be able to have multiple versions co-exist without issues.

You can emerge a specific version simply by specifying the version you want thusly:

emerge -av =python-2.5.4-r4

Some links you might find helpful:

link|improve this answer
feedback

Actually you don't need to specify a full version. More appropriate way is

emerge -av python:2.5

link|improve this answer
thx, helped me to update python 2.6 to 2.7 ) – Sholy May 13 '11 at 13:09
feedback

There's also useful variable in make.conf, used while upgrading python-dependant packages:

USE_PYTHON="2.6 3.2"
link|improve this answer
feedback

Since it is a slotted package, you can have multiple versions installed the way @LXj has already shown. After installing another version, if you want to use it as the default, you should select it by eselect python <version> - check for available versions using eselect python list. The next, highly recommended step is to run python-updater (package app-admin/python-updater) - it is very important to have your python installation in order, because the whole portage is written in that language.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.