by binarymax · 10y ago · 0 comments
/usr/bin/python will always be Python 2. See https://www.python.org/dev/peps/pep-0394/
Python 2 isn't installed by default on Ubuntu cloud images since 16.04.
> 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.
That's as antagonistic to "python will always point to python2" as you can get.
$ 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.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
Edit: See qznc's remark on the pep, apparently it's even advised the keep "python" pointing to python 2.
Yes. If you do a clean install of 16.04 then you won't python2 installed at all.