Thonny

Cross-platform License: MIT

What It Does

Thonny is a beginner-oriented Python IDE with a built-in debugger, variable inspector, and step-through execution. It is the default Python editor on Raspberry Pi OS. It also supports MicroPython and CircuitPython, making it a single tool for writing Python on both desktop and microcontrollers.

Why You Need It

Signal guides that involve Raspberry Pi use Thonny as the primary code editor because it is already installed and configured on Pi OS. It removes the friction of setting up Python environments, virtual environments, and PATH issues that trip up beginners. For MicroPython projects, Thonny provides a direct REPL connection to the board over USB — no additional tools required.

Used in: SG-09

How to Install It

Download from: https://thonny.org

Raspberry Pi (pre-installed)

Thonny comes pre-installed on Raspberry Pi OS. Find it in the applications menu under Programming > Thonny. To update to the latest version:

sudo apt update
sudo apt install thonny
Linux (Debian/Ubuntu)
sudo apt install thonny

Or install via pip for the latest version:

pip install thonny
Windows
  1. Download the Windows installer from thonny.org.
  2. Run the installer. Thonny bundles its own Python, so you do not need Python installed separately.
  3. Launch from the Start menu.
macOS
  1. Download the macOS package from thonny.org.
  2. Open the .pkg file and follow the installer.
  3. Allow it through Gatekeeper if prompted (System Settings > Privacy & Security).

How to Use It

  1. Write and run a script. Type Python code in the editor pane and press F5 (or the green play button). Output appears in the Shell pane at the bottom. Thonny saves the file before running — it will prompt for a filename if the file is new.
  2. Use the debugger. Press Ctrl+F5 to start debugging. Use F7 (step into) and F6 (step over) to walk through your code line by line. The Variables panel on the right shows every variable and its current value in real time.
  3. Switch to MicroPython. Go to Tools > Options > Interpreter and select "MicroPython (Raspberry Pi Pico)" or "MicroPython (ESP32)" from the dropdown. Plug in your board via USB. The Shell pane becomes a live REPL connected to the microcontroller.
  4. Install packages. Go to Tools > Manage packages. Search for a package name (e.g., requests, gpiozero) and click Install. Thonny uses its bundled pip, so packages install into Thonny's own Python environment.
  5. Upload files to a MicroPython board. With the MicroPython interpreter selected, go to File > Save as and choose "MicroPython device" as the target. This writes the file directly to the board's flash storage.

Common Gotchas

Thonny uses its own bundled Python, not the system Python. Packages installed via Thonny's "Manage packages" are only available inside Thonny. If you need a package available system-wide or in a terminal outside Thonny, install it with pip install in a regular terminal instead. You can switch Thonny to use the system Python under Tools > Options > Interpreter.

MicroPython board not detected. If the interpreter dropdown does not show your board, check that (1) the board is plugged in via USB (not just powered), (2) Linux users are in the dialout group (sudo usermod -aG dialout $USER), and (3) the correct MicroPython firmware is flashed to the board. A blank Pico needs UF2 firmware loaded first.

"Permission denied" on Linux when accessing the board. This is a serial port permission issue. Add yourself to the dialout group and log out/in. Alternatively, run sudo chmod 666 /dev/ttyACM0 for a temporary fix (resets on reboot).

Thonny feels limited for larger projects. That is by design. Thonny is optimized for single-file scripts and learning. If your project has multiple files, modules, or virtual environments, graduate to VS Code. Use Thonny for quick Pi scripts and MicroPython REPL work.

Last reviewed: March 2026