Hacker News new | past | comments | ask | show | jobs | submit login

most Linux distros still have Python 2 as the default though, right?



Fedora only includes py3 by default in workstation 32.


No, Ubuntu 18.04 shipped with Python3 as the default.


Not true. Vanilla 18.04 LTS ships with no Python installed by default and the main repos `python` package is 2.7. Same for Debian 10. Ubuntu 20.04 switched the `python` package to Python3.

Even conservative CentOS (where Python is a base dependency for the system, as opposed to the above) is on Python3 as of now though.

As far as I am aware, Debian 10 buster is the last mainstream LTS distro to default to python2. Should change next year with Debian 11.


AFAIK the remaining notable one is Debian. Ubuntu LTS moved to 3 with 20.04.


Only server/LTS versions which need Python 2 for backwards compatibility.


Not most, no.


CentOS 8 and the latest Fedora doesn't even come with Python 2 installed.


That's just a measure for backwards compatibility, so python2-only scripts don't cause cryptic errors when they have a `python` shebang. Many distros ship without python2, but will probably still link `python -> python2` for the near future.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: