1

I recently installed MX-Linux and cannot understand why Python 2.7.16 is installed on Debian 10

I just came across the following information whe googling

Python 3.0 was released in 2008. Its newest version, 3.6, was released in 2016, and version 3.7 is currently in development. Although Python 2.7 is still widely used, Python 3 adoption is growing quickly. ... Notably, on January 1, 2018, Python 2.7 will “retire” and no longer be maintained.

So the first question is why a fresh release of Debian relies on an old Python version?

Then I may ask - could I just upgrade to a more recent release of Python, for instance 3.7, or may it corrupt the OS somehow?

1
  • 1
    Why gets the quesion downvotes, because it is outdated?
    – Timo
    Commented May 14, 2021 at 13:49

1 Answer 1

6

Python 2 and Python 3 are significantly different, and most programs written using Python 2 can’t be migrated automatically to Python 3. Debian 10 includes both: Python 2.7.16, and Python 3.7.3. These were the versions of Python 2 and 3 current at the time Debian 10 was frozen for release.

Python 2 is no longer supported upstream, since earlier this year (not 2018 as indicated in your quote, which is based on out-dated information), but it is still supported by a number of distributions. It is however being phased out; Debian 11 will still include it, along with a limited number of Python 2 modules, but that’s only to preserve minimal backward compatibility to allow a small number of Python 2 applications to continue working. Any new Python development should use Python 3.

Regarding your last question, you can most definitely install the python3 packages provided in Debian. Whatever you do though, don’t try installing newer versions of Python 3 manually; there are a large number of questions here arising from users breaking their setup by doing so.

2
  • thanks for answer, but when writing python --version in a terminal it outputs Python 2.7.16 only. Why's that?
    – java
    Commented Oct 2, 2020 at 13:16
  • 3
    Because python is Python 2; for Python 3, run python3. Commented Oct 2, 2020 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .