Thonny IDE: Best IDE for Beginners in Python

Thonny IDE: Best IDE for Beginners in Python

This blog will discuss the Thonny IDE, which is possibly the best IDE for Beginners in Python, we will discuss how to download and install it, the first view, install libraries in it, write programs in it, its basic features, and some tips and tricks.

Features of Thonny:

  • in-built python(you do not need to download and install Python in your system)
  • beginner-friendly
  • lightweight
  • Highlights syntax errors
  • Explains scopes
  • Code completion
  • Line numbers
  • Statement stepping without breakpoints
  • Live variables during debugging

How to Download the Thonny IDE?

You can download it from the official website: https://thonny.org/. They have mirrors for Windows, Mac, and Linux.

Downloading Thonny IDE

Installing Thonny on Windows

  • After downloading the .exe file from the official website, run the file to start the installation process.
  • Select if you want to install it for all users or not. If you don’t know, just install it for all users.
    Thonny IDE Thonny IDE: Best IDE for Beginners in Python This blog will discuss the Thonny IDE, which is possibly the best IDE for Beginners in Python, we will discuss how to download and install it, the first view, install libraries in it, write programs in it, its basic features, and some tips and tricks.
  • Give the program administrative privileges.
  • Welcome Page: Click on Next.
    Thonny IDE Thonny IDE: Best IDE for Beginners in Python This blog will discuss the Thonny IDE, which is possibly the best IDE for Beginners in Python, we will discuss how to download and install it, the first view, install libraries in it, write programs in it, its basic features, and some tips and tricks.
  • Accept all terms of service and click on “Next” until the installation starts because all the suggested settings are set in the default. Click on Finish after the installation is complete.
    Thonny IDE Thonny IDE: Best IDE for Beginners in Python This blog will discuss the Thonny IDE, which is possibly the best IDE for Beginners in Python, we will discuss how to download and install it, the first view, install libraries in it, write programs in it, its basic features, and some tips and tricks.
  • Congratulations, you have installed Thonny on your Windows machine.

First look at the Graphical User Interface

The first look of the app is like in the image below

First look of Thonny IDE for Beginners

The IDE is divided into the Menu and icons tab, code editor, console or the shell, and the Assistant(Right side).

Thonny IDE: Best IDE for Beginners in Python

The header of the application has the Quick Access Menu. Let’s see all options:-

  • The File menu allows the developer to work on preferences and file edits.
  • The Edit menu will allow the developer to do small tasks like undo, redo, copy, and paste in the code editor.
  • The View menu will allow us to edit the application’s User Interface.
  • The Run menu will let us conduct actions related to running the python program.
  • The Tools and Help menu allows us to do other not-so-important stuff.

The icons tab allows some regular stuff to do faster, like creating a new file, opening an older file, saving the file, running the file, debugging for solutions, stopping the current process, etc.

Menu bar and icons tab in Thonny IDE

How to write and run Python code in Thonny IDE?

Write the following code into the editor and run by clicking F5 or the play button on the icon bar.

Writing the first program in Python IDE for beginners

This is a simple program to print a string.

Let’s try a more complex program for generating the Fibonacci sequence. Write the following code in your code editor and run it.

a = 0
b = 1
for i in range(5):
    print(a)
    print(b)
    a = a + b
    b = b + a
another program

Handling Syntax Errors

When you make a simple mistake and create a syntax error, the IDE will open up a new section in the program called the “Assistant”, which will suggest you possible solution for the error and the bug. Suppose a small syntax error in the above code where we write “rang” instead of the range function.

Thonny IDE Thonny IDE: Best IDE for Beginners in Python This blog will discuss the Thonny IDE, which is possibly the best IDE for Beginners in Python, we will discuss how to download and install it, the first view, install libraries in it, write programs in it, its basic features, and some tips and tricks.

You can see that the assistant also suggests some edits to eliminate the errors.

Installing a new Python Module

To install a new python module, first, click on the Tools in the Action Menu and click on “Manage packages“. Then, search for the package you want. Remember that the package must be available on the PyPI Library. In this tutorial, we are installing “Selenium“.

Installing module in Thonny IDE

Now on the search bar, search for the package and click on the desired module

search the module

Click on the first option and click “Install

click on install

The installation will start

installation started

After installing it, you will see something like this

package installed

Congrats, you can now install a module on the Thonny IDE.

Thanks for reading this blog until the end. To learn more about basic scripting with Python, you can read other blogs on this website with the category: https://copyassignment.com/category/python-projects/.

Our GitHub: https://github.com/copyassignment


Also Read:

Share:

Author: Ankur Gajurel

I am Ankur from Nepal trying to learn different aspects of Information Technology and Physics. I like building websites and minor projects with Python.