Python is one of the most successful programming languages existing. One of the reasons is how flexible it is and the large number of associated tools. One of them is IDLE. So welcome to this post where you will learn how to install IDLE on Ubuntu 22.04.
According to the project website
IDLE is Python’s Integrated Development and Learning Environment.
Now a Learning Environment? Well, this kind of applications are elementary graphical development environments that allow the user to improve his programming practices in a language.
IDLE is also an interactive environment in which you can execute single Python instructions. So, it is good for beginners who want to start with Python and can evaluate parts of code.
Some of the main features of IDLE are:
- Coded in 100% pure Python, using the tkinter GUI toolkit
- Cross-platform: works mostly the same on Windows, Unix, and macOS
- Python shell window (interactive interpreter) with colorizing of code input, output, and error messages
- Debugger with persistent breakpoints, stepping, and viewing of global and local namespaces
- Configuration, browsers, and other dialogs
IDLE has two modes or “windows”: interactive mode and editor mode. The interactive mode displays an IDLE instance where you can execute code snippets in a console-like fashion. On the other hand, the editor mode allows you to use it as a simple IDE, that is, as a code editor with special features for Python.
Install IDLE Python IDE on Ubuntu
In the case of Windows and macOS, IDLE is present as soon as Python is installed. However, in the case of Linux, it is distributed as a separate application that needs to be installed.
Fortunately, IDLE is present in most of the major Linux distributions repositories, so the process will be simple.
The first thing you have to do is to open a terminal and update the entire operating system.
sudo apt update
sudo apt upgrade
As on Linux, Python is a major component of the system, it will already be installed, but to install IDLE just run the following command
sudo apt install idle3 idle3-tools
output
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
blt idle idle-python3.10 libtk8.6 python3-tk tk8.6-blt2.5
Suggested packages:
blt-demo tk8.6 tix python3-tk-dbg
The following NEW packages will be installed:
blt idle idle-python3.10 idle3 idle3-tools libtk8.6 python3-tk tk8.6-blt2.5
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,891 kB of archives.
After this operation, 6,739 kB of additional disk space will be used.
Do you want to continue? [Y/n]
When finished, you can run it from the main menu or by executing this command
idle3
Using IDLE on Ubuntu
As soon as you run it, you will see this screen

By default, you enter the interactive or console mode. Here you can run something simple like
print("Welcome to ImagineLinux")
Once you press Enter, you will notice that the instruction

Editing Python code with IDLE
As said, IDLE can also be an interesting IDE for Python. If you want to edit a python file with IDLE, you can do it from the main menu File > Open when you choose the file, you will be able to edit it.
Another option is to create a new file. For this, you have two options: pressing the keys CTRL + N or going to the main menu File > New File.

A new blank window will pop up with the editor active. Start creating some python code.
For example,
website = "Imagine Linux"
print("My favorite website about Linux? It is " + website)
Save it with a name and extension py
.
To run it, just click on the menu Run > Run Module or simply press the F5
key.
Sample Output

Reviewing IDLE options on Ubuntu
IDLE is very customizable, so it is worth taking a look at its options. To access them, go to Options > Configure IDLE.
There you will see many things. If you go to the Highlights tab, you can access options for how you want the editor to look.

You can customize the existing theme or use one pre-built for you.
In the Windows tab, you can modify the Python indexing or choose which mode will be displayed by default.

Finally, you can in the Extensions tab manage everything related to extensions. You can add a new one or disable the existing one.

As you can notice, it is simple and intuitive.
Uninstall IDLE on Ubuntu
If you no longer want to use IDLE, you can remove it from the system. To achieve this, you can run
sudo apt remove idle3
Remember that IDLE is not part of Python on Linux. So removing it will not cause any problems.
Conclusion
IDLE is a very efficient Python tool that can help novices in learning Python. As it is quite resource efficient, you can also use it on low-power computers.
Now that you know how to install IDLE Python IDE on Ubuntu, you can use it by yourself and notice its advantages.
I hope you liked this post, and you can share it with all your friends.