Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


@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
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 '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


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.