Lurker News
Back to discussion

Comment by lucky_cloud

lucky_cloud4 replies#
- FLAVOR: Ubuntu Server

- HEADLINE: Python 3 as default
- DESCRIPTION: In lieu of a description, I'll just link to this: https://pythonclock.org
- ROLE/AFFILIATION: Developer, sys admin

tobltobs2 replies#
Wouldn't this mess up a lot of current server installations?
raverbashing#
You can't update a major version and expect things like this to not change

(What I mean is: sysadmins are aware of this and won't "just" upgrade to a new major version without considering such factors - at least they shouldn't do that ;) )

rspeer1 reply#
It already happened, so probably not.
tobltobs1 reply#
Hard to decipher what you mean. Maybe you want to say, that is already the default, but as this is obviously wrong you probably want to say, that Python 3 is kind of default now. Which might be true for new projects, but this doesn't have anything to do with the default env for servers. So maybe you did already messed up your server with a python version default change and you want to express that this can not happen to you anymore.

Continue this thread — 1 reply

hyperknot1 reply#
Opposing view: This would make me stay on 16.04 LTS for a long long time.
thom_nic2 replies#
Can you explain why? Assuming you could still `apt-get install python27` and `update-alternatives` to symlink that back to the default `python`, no?
hyperknot4 replies#
The default Python on any system is the only one which is really well tested and works with all the not-trivial-to-compile packages. Making py3 the default is exactly for deprecating py2 support, thus an apt-get install python27 would never have the wide range of apt installed packages, like it does now.

Continue this thread — 4 replies

e12e#
I believe python upstream recommends that "python" is python2 and python3.x is "python3"?[1] (Although, that does not jive with official python packages for windows, which is both annoying and confusing - the pep governs "unix like" systems - eg. including linux subsystem for windows, but excluding python on windows...):

[1] https://www.python.org/dev/peps/pep-0394/

marcoceppi#
I agree, I usually update defaults so that python => python3. However, PEP has some guidance on how this should be handled[1].

I imagine Ubuntu (Debian, et al) is following these guidelines. It would be cool to have a push for those who still depend not only on Python2 but on `/usr/bin/python` being py2 to update their app - or at least update their packaging :)
[1]: https://www.python.org/dev/peps/pep-0394/

rlpb1 reply#
Python 3 is installed by default, and Python 2 is no longer installed by default on Ubuntu Server since 16.04.

Both versions can be installed concurrently. Python 2 is available under /usr/bin/python2 if it is installed. Python 3 is available under /usr/bin/python3 if it is installed.
/usr/bin/python points to Python 2 (or nothing, if Python 2 is not installed). This is the upstream recommendation from PEP 394 (https://www.python.org/dev/peps/pep-0394/) and I don't see Ubuntu diverging from this unless upstream's recommendation changes.

dustinkirkland#
Everything @rlpb just said here is spot on ;-) Definitive +1.