5 ms·
I blame in part, that the default install for OS's like Ubuntu and Mac is Python 2.7. If you are starting python development, and want to support more systems,
by binarymax 10y ago
I blame in part, that the default install for OS's like Ubuntu and Mac is Python 2.7. If you are starting python development, and want to support more systems, and you know the default is 2.7, then that's what you will target.
- teekert 10y agoPython 3 is the default in 16.04 LTS.
- deleted 10y ago[deleted]
- 2T1Qka0rEiPr 10y agoI just posted that my default Python is 2 and I'm on 16.04.1, but I suppose the upgrade from 15.10 perhaps left the default as-is?
- teekert 10y agoI think the fact that python points to python 2 and python3 points to python 3 does not mean one is default and the other is not. One would think so, yes, but this is a bit of difficult case, for historic reasons. Both versions will need to be present because many things depend on 2 still (ufw for one I believe), python 2 was just there first and hence earned the badge "python". To now switch to explicitly calling it python2 and calling python 3 python would break many things probably. On a clean 16.04 install, python 3 is present, python 2 is not, however, you still need to call python 3 with "python3" [0] [0] https://wiki.ubuntu.com/XenialXerus/ReleaseNotes#Python_3 https://wiki.ubuntu.com/XenialXerus/ReleaseNotes#Python_3 Edit: See qznc's remark on the pep, apparently it's even advised the keep "python" pointing to python 2.
- dagw 10y agoI suppose the upgrade from 15.10 perhaps left the default as-is? Yes. If you do a clean install of 16.04 then you won't python2 installed at all.
- kikoreis 10y agoMore explicitly, a standard installation of Ubuntu only depends on (and leaves installed) Python 3: $ lxc launch ubuntu:16.10 yakkety [...] $ lxc exec yakkety python || echo no py2 no py2 Python 2 is still available via a package, and in the main repository, which is what we track to deliver security (and critical bugfix) updates for. But we definitely see the importance of moving the ecosystem along -- despite the historical complexity of the transition, and the challenge in getting people to move from their comfort zone.
- rlpb 10y agoWhat does "default install" mean? /usr/bin/python will always be Python 2. See https://www.python.org/dev/peps/pep-0394/ https://www.python.org/dev/peps/pep-0394/ Python 2 isn't installed by default on Ubuntu cloud images since 16.04.
- nallerooth 10y agoPython 3 is the default in Arch too.
- marcosdumay 10y ago> for the time being, all distributions should ensure that python refers to the same target as python2 . > however, end users should be aware that python refers to python3 on at least Arch Linux... That clearly means he will recommend /usr/bin/python migrates to python3 some day, and that today developers can already not count on it being python2.
- rlpb 10y agoNo. It means that Arch did something that all the other distributions thought was so obvious that it didn't even need to be specified, and then they had to write a PEP to explain what is going on, write down what was considered to not be needed to be written down, and what users can no longer assume as a consequence.
- marcosdumay 10y agoBeyond the abstract, goes goes on to explain that, no distros shouldn't do what Arch did (like you said), that developers must strop trusting that python points to python2, and that he will change this PEP when the context changes. That's as antagonistic to "python will always point to python2" as you can get.