Python 2.7 end-of-life – The time to upgrade is upon us

1st January 2020 marked the official end of python 2.7 development, including feature support and security fixes.

Python 2.7 end-of-life

Python 2.7 was over 9 years old in development years, making it the longest supported version to date. The code freeze is no in place, with the final release – 2.7.18 – scheduled for an April 2020 release. So yes there will be one more version to come down the tubes but it’s probably best that the new python project you were thinking of starting is written in 3.7 or above.

Migrating away from Python 2.7

One useful resource for tracking the impending demise of a Python version: https://python-release-cycle.glitch.me/

You might be inclined to believe that any version of 3.X is good enough and better than running or developing in 2.7, however, there are a number of versions of 3 which have already reached the end of support – 3.2, 3.3, 3.4 – and others with only a few months on the clock – 3.5 and 3.6.

For those working on a Python project written in 2.7, here is the official porting guide: https://docs.python.org/3/howto/pyporting.html

For those who just wish to update the operating system’s primary python version used for running scripts and commands, I have composed a number of simple guides to make 3.7 your default version of python, including subsequent fixes for pip:

and if you are looking to move from 3.5 to 3.7:

The final goodbye for Python 2.7?

In conclusion, whilst the new year marks the official sunset for Python 2.7, the road to migration to newer versions has been famously messy and in some sense a failure. Don’t be surprised to encounter 2.7 projects for years to come; consider 2.7 an annoying requirement for so time to come.

One Reply to “Python 2.7 end-of-life – The time to upgrade is upon us”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: