

Thonny Debugger Thonny ConfigurationĪll the configurations are stored in the “ configuration.ini” file. You can also access these option from “ Menu Bar → Run → Debugging options”. Press F7 for a small step and F6 for a bigger step. Press Ctrl+F5 to run your program step-by-step, no breakpoints needed. In case if you wish to uninstall the package, it is simple, go ahead and click the “ uninstall” button at the bottom of the package as shown in the image. You can get the details like package version, library location once the package is installed.
Python thonny install#
Once you press Install, it will install the package. Dependencies are automatically installed.

You can install the latest version or choose different versions as shown in the image. When you select the package from the list, It will take you to the installation page. In my case, I am trying to install a package call numpy. It will search the PyPI index and displays the list of package matching the name. In the search bar, you can type a package name and press search.

But with Thonny, a GUI interface is available to manage packages. We will normally use PIP ( Python Package Manager) to install desired packages from PyPI. It is known that all the python packages are hosted at PyPI. Thonny Build-in Features Thonny Package Manager To Toggle on-off these features Go to “ View → toggle Feature ON/OFF”. The real power of thonny comes with built-in features like File Explorer, Variable Explorer, Shell, Assistant, Notes, Heap, Outline, Stack.
Python thonny code#
The third option allows you to run your code in an external terminal. The first two methods will switch the directory to wherever your code is and invoke the program file in the Built-in terminal. Press “ CTRL+T” or Go to “ Run → Press Run current script in terminal”.Go to “ Menu Bar → Press Run → Run Current Script”.Press F5 or Execute Icon as shown in Image.First, your code should be saved to a file for Thonny to execute. There are 3 ways you can run the code you created. To change Theme and Fonts Go to “ Menu Bar → Tools → Options → Theme & Font”. You can change themes for Editor as well as UI theme.
Python thonny how to#
I suggest sticking with the default python installation unless you know how to fix it if something breaks when switching the interpreter. Go to “ Menu Bar → Tools → Options → Interpreter → Set the path” or “ Menu Bar → Run → Select Interpreter → Set the path”. You can stick with the default interpreter ( Python 3.7) or choose different interpreters available on the system. We have already seen Python 3.7 is installed by default and thonny sets 3.7 as the default interpreter. Older version ships with Python2* and the latest versions ship with Python3*. Linux distributions by default ships with python. You will have an editor area where you can code and shell to run the script or test codes interactively.

When you launch Thonny you will get a distraction-free GUI interface. Thonny Directory How to Use Thonny IDE in Linux Inside the bin directory, there is python 3.7 and PIP 3 that comes with thonny and thonny launch binary. If you look at the thonny folder it has install script, necessary python libraries for thonny to work, binaries. Start Thonny IDEĪs shown in the installation section, Thonny is installed in the home directory. Thonny will ask you to set up Language and Initial settings. To launch thonny, go to the installed directory and type “. In my case, it is installed in my home directory. At the end of the installation, you will come to know where is thonny installed. $ sudo dnf install thonny įor demonstration purposes, I am using Ubuntu 20.04 and running the installer script with wget command as shown above to install thonny. Install Thonny IDE Using Package Manager $ sudo apt install python3-tk thonny Install Thonny IDE Using Installer Script # bash <(curl -s ) Install Thonny IDE Using Pip # pip3 install thonny
