How to install Python IDLE in Linux

IDLE is integrated development environment for python developed in Python and Tkinter GUI toolkit. It comes with Python installation. It also bundled with many Linux as a part of Python.

If you have just started learning Python, you probably are using IDLE. IDLE is cross-platform application used by many beginners. If IDLE is not already installed on your Mac or Linux, this article will help you to install it on Linux box.

If you are a seasonal developer and you want full IDE, you can use VIM, VS Code, Pycharm, Sublime Text, IntelliJ

Installing Python IDLE in Linux

Most new Linux comes with Python installed which is bundled with IDLE. If for some reason Python is not installed in your Operating System, you can install it using default package manager.

Run the following command Debian or Ubuntu terminal to install IDLE

sudo apt-get install idle3 # this command installs IDLE for Python3, if you are using Python2+, you can just change idle3 to idle in the command.

If you want to install IDLE in CentOS, Red Hat or Fedora, run the following command

sudo yum install python3-tools

Once the installation is done, you can open IDLE from start menu, or type idle in terminal. It should look something like below:

IDLE for Linux

IDLE has autocomplete support, you can enable it using ALT + Space in Linux and CTRL + Space in Mac.

Write Hello Word in Python IDLE

To create new Python file, select file from the menu and click new file. You can write your program and save the file by select save from file menu.

Run the program by pressing F5 or selecting “Run Module” from Run Menu.

Run python code in IDLE in Linux
We and our partners share information on your use of this website to help improve your experience.