Now let’s write our very first Python 3 program and save it as hello.py somewhere on your filesystem. NOTE: You can also save the file by pressing + s. To save the file, click on File and then click on Save as shown in the screenshot below. Once you write some code in it, save it somewhere on your filesystem. I created a new file, and when you do, it should look something like this. NOTE: You can also press + n to create a new file and open it 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 + o to open an existing Python 3 source file in the graphical editor. From here you can click on Open… to open an existing Python 3 source code file in the graphical editor. Now to go to the graphical editor, click on File and you should see the following menu. It is good for testing very simple codes or logics before putting it to your Python 3 source code file. This is a Python 3.6 shell where you can execute python codes, one line at a time. You should see the following icon as marked in the screenshot below, click on it. Now that you have Python 3 IDLE installed, you can go to the Application Menu and search for Python 3 IDLE. To install Python 3 IDLE for Python 3.7, run the following command: Using IDLE to Develop a Python 3 Program To install Python 3 IDLE for Python 3.6, run the following command: Python 3 IDLE is available in the official package repository of Ubuntu 18.04 LTS. It is lightweight and has nice syntax highlighting ability. You can always start writing Python 3 code with Python 3 IDLE. Python 3 IDLE is a graphical program for writing python 3 programs and test them. Installing Python 3 IDLE for Developing Python Program You can run the following command to verify whether Python 3.7 is working:Īs you can see, it’s working. To install Python 3.7 (still in beta at the time of this writing), run the following command: Now to install Python 3.6, run the following command:Īs you can see from the screenshot below, Python 3.6 is already installed as I said. The package repository cache should be updated. Installing Python 3įirst update the package repository cache with the following command: In this article, I will show you how to install Python 3.6 and Python 3.7 in case you don’t have it installed. Python 3.7 (still in beta) is also available in the official package repository of Ubuntu 18.04 LTS at the time of this writing. Python 3.6 should be installed on Ubuntu 18.04 LTS by default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |