3

I'm using Gentoo Linux and i want to install Python2.5 but there is a problem.

The command, emerge -av python outputs the following,

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

  • 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
5

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:

  • 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
6

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

emerge -av python:2.5

  • thx, helped me to update python 2.6 to 2.7 ) – cnd May 13 '11 at 13:09
3

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

USE_PYTHON="2.6 3.2"
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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