Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|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

4 Answers 4

up vote 4 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

or with newer portage versions, by slot name rather than version #:

emerge -av python:2.5

Some links you might find helpful:

share|improve this answer
    
I am having problem with eselect python set. When I select for example 2.7 and then start python interpreter it sill show version 3.3. Do you have any idea how to solve this. –  pregmatch Nov 14 at 14:54

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

emerge -av python:2.5

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

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

USE_PYTHON="2.6 3.2"
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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