View previous topic :: View next topic |
Author |
Message |
Monq n00b
Joined: 11 Feb 2011 Posts: 41 Location: Spain
|
Posted: Sat May 13, 2017 5:52 pm Post subject: How do I install a recent version of Python? |
|
|
I understand big parts of the base system depend on Python, and that's why we're stuck with an ancient version. But is it possible to install a recent version of Python without updating the whole system? I thought of downloading and compiling it by hand from python.org, but I was wondering if there was something that I could trust in an overlay or somewhere else... |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30917 Location: here
|
Posted: Sat May 13, 2017 6:07 pm Post subject: |
|
|
Python version are slotted you can have different version on system
Code: | [I] dev-lang/python
Available versions:
(2.7) 2.7.12 ~2.7.13
(3.4) 3.4.5(3.4/3.4m) ~3.4.6(3.4/3.4m)
(3.5) ~3.5.3(3.5/3.5m)
(3.6) ~3.6.1-r1(3.6/3.6m)
{-berkdb build doc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml ELIBC="uclibc"}
Installed versions: 2.7.12(2.7)(06:22:07 PM 12/06/2016)(gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -berkdb -build -doc -examples -hardened -libressl -tk -wininst ELIBC="-uclibc") 3.4.5(3.4)(06:23:45 PM 12/06/2016)(gdbm ipv6 ncurses readline ssl threads xml -build -examples -hardened -libressl -sqlite -tk -wininst ELIBC="-uclibc")
Homepage: https://www.python.org/
Description: An interpreted, interactive, object-oriented programming language |
You can have at same time 2.7, 3.4, 3.5 and 3.6 _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat May 13, 2017 6:15 pm Post subject: Re: How do I install a recent version of Python? |
|
|
Monq wrote: | I understand big parts of the base system depend on Python, and that's why we're stuck with an ancient version. |
Monq ... that's not the case, the reason for 2.7 is that there are still packages that only work with 2.7, for "base" packages (and I assume you mean portage) you can build with any of PYTHON_TARGETS="pypy python2_7 python3_4 python3_5 python3_6".
Monq wrote: | But is it possible to install a recent version of Python without updating the whole system? I thought of downloading and compiling it by hand from python.org, but I was wondering if there was something that I could trust in an overlay or somewhere else... |
Python is slotted, so you can install whatever version available, eg 'emerge dev-lang/python:3.6'. However, you would then need to adjust PYTHON_TARGETS to reflect this fact, and run app-admin/python-updater so that any package with PYTHON_TARGETS="python3_6" install their components for that version.
best ... khay |
|
Back to top |
|
|
Monq n00b
Joined: 11 Feb 2011 Posts: 41 Location: Spain
|
Posted: Sat May 13, 2017 6:21 pm Post subject: |
|
|
Thank you very much for your tips, I'll try this. |
|
Back to top |
|
|
|