Day: April 10, 2011

Gentoo default Python interpreter

Gentoo default Python interpreter is set to version 3.1:
~ # eselect python list
Available Python interpreters:
[1] python2.6
[2] python3.1 *

Command to change default interpreter:
~ # eselect python set 1
And now interpreter version is 2.6:
~ # eselect python list
Available Python interpreters:
[1] python2.6 *
[2] python3.1

Installing version 2.7:
~ # nano /etc/portage/package.accept_keywords
=dev-lang/python-2.7*
^X (Ctrl+X) --> exit & save
~ # emerge --ask =dev-lang/python-2.7*

Rebuild Python modules:
~ # python-updater
* Starting Python Updater...
* Main active version of Python: 2.7
* Active version of Python 2: 2.7
* Active version of Python 3: 3.1

Happy python coding!