Python is a powerful programming language. It is very friendly and easy to learn. At writing time of this article Python 3.7.2 latest stable version is available to download and install. Install Python 3.7.2 on Linux Ubuntu Systems. Python is a programming language that lets you work more quickly and integrate your systems more effectively. Python 3.7.2 is the second maintenance release of Python 3.7.
$ python3.7 -version As you can see, it’s working. Installing Python 3 IDLE for Developing Python Program Python 3 IDLE is a graphical program for writing python 3 programs and test them.
It is beginner friendly. You can always start writing Python 3 code with Python 3 IDLE. It is lightweight and has nice syntax highlighting ability. Python 3 IDLE is available in the official package repository of Ubuntu 18.04 LTS. For Python 3.6: To install Python 3 IDLE for Python 3.6, run the following command. $ sudo apt-get install idle-python3.7 Using IDLE to Develop a Python 3 Program Now that you have Python 3 IDLE installed, you can go to the Application Menu and search for Python 3 IDLE. You should see the following icon as marked in the screenshot below, click on it.
You should see the following window. This is a Python 3.6 shell where you can execute python codes, one line at a time. It is good for testing very simple codes or logics before putting it to your Python 3 source code file. Now to go to the graphical editor, click on File and you should see the following menu. From here you can click on Open to open an existing Python 3 source code file in the graphical editor.
NOTE: You can also press + o to open an existing Python 3 source file in the graphical editor. Or you can click on New File to create a new file and open it in the graphical editor. NOTE: You can also press + n to create a new file and open it in the graphical editor. I created a new file, and when you do, it should look something like this.
This is the graphical code editor. Once you write some code in it, save it somewhere on your filesystem. To save the file, click on File and then click on Save as shown in the screenshot below.
NOTE: You can also save the file by pressing + s. Now let’s write our very first Python 3 program and save it as hello.py somewhere on your filesystem. To run the program, click on Run and then click on Run Module. You can also press F5 to run the program. As you can see, the correct output is displayed on the console. Customizing Python 3 IDLE You can go to Options and then Configure IDLE to go to the configuration window of Python 3 IDLE. Settings window should open as you can see in the screenshot below.
From the Fonts/Tabs tab, you can change your IDLE font, font size, the default indentation width. From the Highlights tab, you can change the Color Scheme or Theme of IDLE. By default, IDLE Classic is set. You can also choose IDLE Dark and IDLE New as you can see in the marked section of the screenshot below. Once you’re done, click on OK.
The changes should be applied. IDLE Dark theme: That’s how you install Python 3 and start learning Python 3 on Ubuntu 18.04 LTS. Thanks for reading this article.