Table of Contents
This tip is about the how to Run Python 2 on Ubuntu 22.04 LTS Jammy Linux. So read this free guide, How to Run Python 2 on Ubuntu 22.04 LTS Jammy Linux step by step. If you have query related to same article you may contact us.
How to Run Python 2 on Ubuntu 22.04 LTS Jammy Linux – Guide
Python 2 will be installed on Ubuntu 22.04 Jammy Jellyfish this tutorial. Since a few years Python 2 is not the default version installed on Ubuntu releases, however Python 2 and Python 2.7 can still be installed on Ubuntu 22.04. On Ubuntu 22.04 Jammy Jellyfish, follow the step-by-step steps below to install Python 2 and set it as the default Python interpreter.
How to Run Python 2 on Ubuntu 22.04 LTS Jammy Linux
Update Ubuntu
Before proceeding with the tutorial, it is good to ensure that your system is up-to-date with all existing packages.
sudo apt update && sudo apt upgrade
Install the IDLE Python IDE Editor
Installing IDLE Python is quite simple. Depending on the version of Python you are working with on your Jammyfish system, run the following command. Example with the syntax:
sudo apt install idle-python{version}
Now install IDLE version 3.10 or install IDLE Python versions 3.9 or 2.7 which are also available.
Install IDLE Python 3.10
sudo apt install idle-python3.10 -y
Install IDLE Python 3.9
sudo apt install idle-python3.9 -y
Install IDLE Python 2.7
sudo apt install idle-python2.7 -y
How to Launch the IDLE Python IDE Editor
Now that you have the software installed, launching can be done in a few ways. In your terminal, use the following command.
idle
If you want to start and use the terminal simultaneously, send it to the background to continue using the current terminal.
idle &
However, this is not practical for desktop users and you would use the following path on your desktop to open with the following approach.
Activities > Show Applications > IDLE Python{version}.
How to Update Python IDLE IDE Editor
Depending on the installation method used, the following commands can be used to update the software and any system packages. Ideally, the terminal update command should be used even with automatic updates on the desktop GUI to ensure that everything is being updated correctly.
APT update method
sudo apt upgrade && sudo apt upgrade
How to Remove (uninstall) IDLE Python IDE Editor
Use one of the following commands to suit the original installation method for users who no longer need the app.
APT IDLE Python 3.10 removal method
sudo apt autoremove idle-python3.10 –purge -y
APT IDLE Python 3.9 removal method
sudo apt autoremoe idle-python3.9 –purge -y
APT IDLE Python 2.7 removal method
sudo apt autoremove idle-python2.7 –purge -y
Final note
I hope you like the guide How to Run Python 2 on Ubuntu 22.04 LTS Jammy Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.