How to Install IDLE Python IDE in Ubuntu and Other Linux

Python’s usual IDE IDLE is not loaded by default in Ubuntu and other distributions. This guide will inform you how to setup it.

IDLE (Integrated Development and Learning Environment) is a Python IDE that is built in the Python programming language and is typically loaded in Windows as part of the Python installation. It is simple to use and perfect for novices. It can be an useful IDE to start with for those studying Python, such as students.

This IDE includes basic tools such as syntax colouring, clever ident, and auto-completion. More information about the IDLE capabilities can always be found in the official documentation.

READ ALSO: HOW TO CHOOSE THE RIGHT PROGRAMMING LANGUAGE FOR YOUR PROJECT

IDLE in Ubuntu and other Linux

Python is pre-installed on all Linux distributions, including Ubuntu. The IDLE IDE does not come with any Python versions, even if you manually upgrade or install them. You must manually install it.

To install IDLE on Debian, Ubuntu, Linux Mint, and other similar distributions, start a terminal and execute the following instruction.

sudo apt update
sudo apt install idle3

When the command asks if you want to install IDLE, enter yes. IDLE will be loaded in your Ubuntu machine once the command is finished.

To install it on Fedora, RHEL, or CentOS, run the following instruction.

sudo dnf update
sudo dnf install idle3

Users of Arch Linux can install it with the following instruction.

sudo pacman -S python tk
IDLE install and run in Ubuntu

Launching IDLE and writing a sample program to test

The IDLE icon can be found in the programme interface after installation in Ubuntu, Debian, Linux Mint, and Fedora. See the list below.

IDLE icon in the application menu

To start IDLE on Arch Linux, execute the command below from the command line.

idle

When you start IDLE, the main window should appear, as shown in the picture below.

IDLE IDE main window

It displays a shell by default, where you can immediately run Python code in each line. It functions similarly to any other shell programme. When you press return, the result is displayed, and the three “>” symbols move to the next line for the next instruction.

Running a simple Python statement in IDLE

IDLE also has a file menu that enables you to access any.py file. It will open the file in a new window, allowing you to make adjustments and execute it immediately. You can start it by pressing F5 or by selecting Run > Begin Module.

A python file opened from IDLE
Option to Run the file using menu

The result is displayed in a different window. You can initiate debugging, move into a line or file, examine the stack trace, and other choices from the output window.

Output is shown in a separate output window of IDLE

Closing Notes

You now know how to install the IDLE IDE in Ubuntu and other versions, as well as how to execute a Python statement or programme. IDLE can be an useful place to start for beginners to learn the fundamentals before moving on to more complicated IDEs.

I trust this guidance is useful to you as you embark on your Python adventure.

SOURCE:

DebugPoint: How to Install IDLE Python IDE in Ubuntu and Other Linux

What’s your Reaction?
+1
2.4k
+1
1.1k
+1
234
+1
462
+1
34
+1
27
+1
14