Skip to content

HOW-TO: Installing Thonny on the Raspberry Pi

HOW-TO: Installing Thonny on the Raspberry Pi

Section titled “HOW-TO: Installing Thonny on the Raspberry Pi”

Thonny is a great little editor for Python that supports Python, MicroPython, as well as virtual environments. Thonny has its own package manager that can pip install packages in your environment(s).

However if you previously installed Thonny with the aptitude package manager in the Raspberry Pi OS, you may have gotten a slightly older version with some bugs in the package manager.

So, the following steps can be followed to replace this with the newest bug-free version (as of October 15, 2025)

If you had previously installed Thonny, you may uninstall it via

Terminal window
sudo apt remove thonny
bash

or

Terminal window
pip remove thonny
bash

To install the latest version, do not use apt or pip. Instead, get the installer from the source as follows, at the bash terminal:

Terminal window
bash <(wget -O - https://thonny.org/installer-for-linux)
bash

Thonny should be installed and accessible from the GUI. To make it runnable from the command prompt, you may also add it to the path as follows:

Terminal window
echo 'export PATH="$PATH:$HOME/apps/thonny/bin"' >> ~/.bashrc
source ~/.bashrc
bash

Confirm the functionality by running thonny from the command line as follows:

Terminal window
thonny
bash