How to install IDLE Python IDE under Ubuntu and other Linux?

2023-09-12 14:34:32

<p>IDLE (Integrated Development and Learning Environment) is a Python IDE, which is written by Python itself and usually installed as a part of Python installation in Windows. It is an ideal choice for beginners, and it is very simple to use. For those who are learning Python, such as students, it can be used as a good IDE.</p><p>Basic functions such as grammar highlighting, intelligent recognition and automatic completion are some characteristics of this IDE. You can always learn more about the functions of IDLE in the official documents.</p><p>Ubuntu and other Linux IDLE All Linux distributions, including Ubuntu, have Python installed. Even if you manually upgrade or install the Python version, the IDLE integrated development environment will not be installed by itself. You must install it manually.</p><p>For Debian, Ubuntu, Linux Mint and related distributions, open a terminal and run the following command to install IDLE:</p><p>sudo apt update</p><p>sudo apt install idle3</p><p>When the command asks if you want to install IDLE, enter Yes. After the command is completed, IDLE will be installed in your Ubuntu system.</p><p>For Fedora, RHEL, CentOS, use the following command to install it:</p><p>sudo dnf update</p><p>sudo dnf install idle3</p><p>Arch Linux users can use the following commands to install:</p><p>sudo pacman -S python tk</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/lobs1rsub0m127.jpg"/></p><p>Installation and Operation of IDLE in Ubuntu</p><p>After starting IDLE and writing a test program to install in Ubuntu, Debian, Linux Mint and Fedora, you can find the icon of IDLE in the application menu. See the figure below:</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/w4d4al15tvm128.jpg"/></p><p>IDLE icon in the application menu</p><p>If you are using Arch Linux, you need to run the following on the command line to start IDLE:</p><p>idle</p><p>After starting IDLE, you should see the main window, as shown in the following figure:</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/ljkhasl2mso129.jpg"/></p><p>IDLE editor main window</p><p>By default, it will display an interactive interface Shell, and you can execute Python code directly in each line. It works just like any Shell interpreter. And when you click enter, you will get the output, and there are three &gt; symbols to enter the next line and execute the next command.</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/1lh234jtbjs130.jpg"/></p><p>Run a simple Python statement in IDLE.</p><p>IDLE also allows you to open any. py file from its file menu. It will open the file in a separate window, where you can modify it and run it directly. You can use F5 or Run the Run &gt; Run Module from the option to run it.</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/vwagaf3mzqe131.jpg"/></p><p>A Python file opened from IDLE.</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/cnmmsekgttd132.jpg"/></p><p>The option to run the file using the menu.</p><p>The output will be displayed in a separate output window. You can debug in the output window, check the stack trace and other options to enter the specified line or file.</p><p><img src="https://freeonlinedomain.com/uploads/allimg/Server/20230912/ipb0kw0ng2p133.jpg"/></p><p>The output is displayed in a separate output window of IDLE.</p>


Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us