View previous topic :: View next topic |
Author |
Message |
roundtuit n00b
Joined: 26 Feb 2013 Posts: 3
|
Posted: Tue Feb 26, 2013 10:45 pm Post subject: install python 2.7 |
|
|
I have python 3.2.3 installed and I'd like to have python 2.7. However, I can't seem to find the right reference for convincing emerge to do that for me. Sorry, this is very basic, but I need a pointer. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Tue Feb 26, 2013 10:55 pm Post subject: |
|
|
Code: | emerge =dev-lang/python-2.7.3-r3 | The Working with gentoo and Working with portage parts of the handbook are recommended reading. _________________ Defund the FCC. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Feb 27, 2013 12:40 am Post subject: |
|
|
roundtuit ...
alternately, you can stipulate the 'slot' like so:
Code: | # emerge -a python:2.7 |
or ... use a wildcard (so that any keyworded version is applicable)
Code: | # emerge -a =dev-lang/python-2* |
best ... khay |
|
Back to top |
|
|
roundtuit n00b
Joined: 26 Feb 2013 Posts: 3
|
Posted: Mon Mar 04, 2013 11:20 pm Post subject: |
|
|
khayyam wrote: | roundtuit ...
alternately, you can stipulate the 'slot' like so:
Code: | # emerge -a python:2.7 |
or ... use a wildcard (so that any keyworded version is applicable)
Code: | # emerge -a =dev-lang/python-2* |
best ... khay |
Thanks, I used that last one (once I got past my emerge portage failing with bash-4.2 after I did a sync [1] - had to manually build bash 4.1 and temporarily put in in place of bash 4.2 at /bin/bash). The python-2* emerge worked well (esp. when you don't know exactly which 2* flavor it is - although I haven't yet found the right way to list what possible version is available)
Then (for the sake of others reading this thread later) I did 'eselect python set python2.7' ("python2", "python2*" didn't work - there's probably a way) to make python2 (currently 2.7.3) the default.
[1] I gather one is supposed to emerge portage first, then emerge --sync. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Mar 04, 2013 11:58 pm Post subject: |
|
|
roundtuit wrote: | I haven't yet found the right way to list what possible version is available. |
roundtuit ... not sure I understand what happened with bash, or why that might happen. Anyhow, getting version information: 'eshowkey' (app-portage/gentoolkit).
Code: | # eshowkey python
Keywords for dev-lang/python:
| | u |
| a a p s | n |
| l m h i m m p s p | u s | r
| p d a p a 6 i p c 3 a x | s l | e
| h 6 r p 6 8 p p 6 9 s r 8 | e o | p
| a 4 m a 4 k s c 4 0 h c 6 | d t | o
------------+---------------------------+-------+-------
2.5.4-r4 | + + + + + + ~ + + + + + + | o 2.5 | gentoo
2.5.4-r5 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo
------------+---------------------------+-------+-------
2.6.8 | + + + + + + ~ + + + + + + | o 2.6 | gentoo
2.6.8-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo
------------+---------------------------+-------+-------
[I]2.7.3-r2 | + + + + + + ~ + + + + + + | o 2.7 | gentoo
2.7.3-r3 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo
------------+---------------------------+-------+-------
3.1.5 | + + + + + + ~ + + + + + + | o 3.1 | gentoo
3.1.5-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo
------------+---------------------------+-------+-------
[I]3.2.3 | + + + ~ + + ~ + + + + + + | o 3.2 | gentoo
3.2.3-r1 | + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo
3.2.3-r2 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo
------------+---------------------------+-------+-------
3.3.0 | o o o o o o o o o o o o o | # 3.3 | gentoo
3.3.0-r1 | o o o o o o o o o o o o o | o | gentoo |
roundtuit wrote: | Then (for the sake of others reading this thread later) I did 'eselect python set python2.7' ("python2", "python2*" didn't work - there's probably a way) to make python2 (currently 2.7.3) the default. |
Thats right, becuase 'python2*' might match more than one target, and so the version must be explicit. You can also use the numeric tags:
Code: | # eselect python list
Available Python interpreters:
[1] python2.7 *
[2] python3.2
# eselect python set 1 |
best ... khay |
|
Back to top |
|
|
roundtuit n00b
Joined: 26 Feb 2013 Posts: 3
|
Posted: Tue Mar 05, 2013 2:03 am Post subject: |
|
|
Thanks for all the info. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Mar 05, 2013 4:00 am Post subject: |
|
|
roundtuit wrote: | Thanks for all the info. |
roundtuit ... you're welcome. I should also have also mentioed app-portage/eix, which can also provide version information, useflags, homepage, etc.
Code: | # eix --exact python
[I] dev-lang/python
Available versions:
(2.5) 2.5.4-r4 ~2.5.4-r5
(2.6) 2.6.8 ~2.6.8-r1
(2.7) 2.7.3-r2 ~2.7.3-r3
(3.1) 3.1.5 ~3.1.5-r1
(3.2) 3.2.3 ~3.2.3-r1 ~3.2.3-r2
(3.3) **3.3.0 **3.3.0-r1
{-berkdb build doc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"}
Installed versions: 2.7.3-r2(2.7)(20:05:36 27/09/12)(gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -berkdb -build -doc -examples -tk -wininst ELIBC="-uclibc") 3.2.3(3.2)(16:28:11 27/09/12)(gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -build -doc -examples -tk -wininst ELIBC="-uclibc")
Homepage: http://www.python.org/
Description: An interpreted, interactive, object-oriented programming language |
best ... khay |
|
Back to top |
|
|
|