
Python 2 was once the backbone of many software projects, but it reached end-of-life in January 2020 and is no longer maintained. However, some legacy applications and scripts still rely on Python 2 to function properly. By default, Ubuntu 20.04 does not come with Python 2 pre-installed, as it focuses on Python 3 for modern development. Installing Python 2 on Ubuntu 20.04 allows you to maintain compatibility with older projects while using a stable and secure operating system.
In this article, you’ll learn how to install Python 2 on Ubuntu 20.04, set it up properly, and ensure it runs alongside Python 3 without conflicts. If you're using FreeBSD instead, check out how to install Python 2 on FreeBSD 14.
SSH to your Ubuntu 20.04 server and install Python 2 with apt.
Check the Python version.
Check what Python versions are available on system.
See if there are Python alternatives configured.
For this example, we will set two Python alternatives: Python2 and Python3.
Confirm that both alternatives are ready to be used:
Select the alternative Python version.
Enter your selection. In this example, choose 1 to select Python 2.
Check your python version:
Even though Python 2 is deprecated, it's still possible to install and use with your Vultr VPS running Ubuntu 20.04.
0 Comments
Be the first to comment and share your perspective with the community.