How to install IDLE Python IDE under Ubuntu and other Linux

WBOY
Release: 2023-05-23 18:29:19
forward
878 people have browsed it

IDLE (Integrated Development Learning Environment Integrated Development and Learning Environment) is a Python The IDE, written in the Python language itself, is usually installed as part of the Python installation on Windows. It's ideal for beginners and is simple to use. For those who are learning Python, such as students, it serves as a great IDE to get started.

Basic features such as syntax highlighting, smart recognition, and auto-completion are some of the features of this IDE. You can always learn more about IDLE's features in the official documentation.

IDLE in Ubuntu and other Linux

All Linux distributions including Ubuntu come with Python installed. Even if you manually upgrade or install the Python version, the IDLE integrated development environment does not come installed. You must install it manually.

For Debian, Ubuntu, Linux Mint and related distributions, open a terminal and run the following command to install IDLE:

sudo apt update
Copy after login
<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:bash;toolbar:false;">sudo apt install idle3</pre><div class="contentsignin">Copy after login</div></div><p>When the command When asked if you want to install IDLE, enter <code>Yes. Once the command completes, IDLE will be installed on your Ubuntu system.

For Fedora, RHEL, CentOS, use the following command to install it:

sudo dnf update
Copy after login
<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:bash;toolbar:false;">sudo dnf install idle3</pre><div class="contentsignin">Copy after login</div></div><p><strong>Arch Linux</strong> User You can use the following command to install: </p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:bash;toolbar:false;">sudo pacman -S python tk</pre><div class="contentsignin">Copy after login</div></div><p><img src="https://img.php.cn/upload/article/000/887/227/168483776170592.jpg" alt="怎么在Ubuntu和其他Linux下安装IDLE Python IDE" /></p><p><em>Installation and running of IDLE in Ubuntu</em></p><h4>Start IDLE and write a test program</h4><p>After installation in Ubuntu, Debian, Linux Mint and Fedora, you can find the IDLE icon in the application menu. See the picture below: </p><p><img src="https://img.php.cn/upload/article/000/887/227/168483776251366.jpg" alt="怎么在Ubuntu和其他Linux下安装IDLE Python IDE" /></p><p><em>IDLE icon in the application menu</em></p><p>If you are using Arch Linux, you need to Run the following to start IDLE: </p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:bash;toolbar:false;">idle</pre><div class="contentsignin">Copy after login</div></div><p>After starting IDLE, you should see the main window as shown below: </p> <p><img src="https://img.php.cn/upload/article/000/887/227/168483776251147.jpg" alt="怎么在Ubuntu和其他Linux下安装IDLE Python IDE"></p> <p><em>IDLE Editor main window</em></p> <p>By default, it displays an interactive interface Shell, and you can execute Python code directly in each line. It works like any shell interpreter. And when you hit the enter key, you will get the output, and there are three <code>> symbols to go to the next line and execute the next command.

怎么在Ubuntu和其他Linux下安装IDLE Python IDE

Run a simple Python statement in IDLE

IDLE also allows you to open any .py from its file menu document. It will open the file in a separate window where you can make modifications and run it directly. You can run it using F5 or from the option "Run > Run Module".

怎么在Ubuntu和其他Linux下安装IDLE Python IDE

A Python file opened from IDLE

怎么在Ubuntu和其他Linux下安装IDLE Python IDE

Run using the menu The file's options

output will be displayed in a separate output window. You can debug in the output window, view stack traces and other options to step into a specific line or file.

怎么在Ubuntu和其他Linux下安装IDLE Python IDE

The output is displayed in a separate output window in IDLE

The above is the detailed content of How to install IDLE Python IDE under Ubuntu and other Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template