Thonny setup for MicroPython on ESP32 made simple

In this post we will install Thonny for MicroPython development with ESP32 devices on an Ubuntu-derived distribution.

Step 1: Required repository packages

A number of python3-related packages are required to be installed from the Linux Mint repositories. This can be done as follows:

sudo apt install python3-dev python3-tk python3-venv

Step 2: Create virtual environment

python3 -m venv thonny
cd thonny
source bin/activate

Step 3: Populate the virtual environment

python -m pip install -U wheel setuptools pip
python -m pip install -U Cython esptool thonny
deactivate

NOTE: The installs must be split as shown to prevent ordering changes breaking things.

Running Thonny from the virtual environment

cd
python3 -m venv thonny
source thonny/bin/activate
thonny
deactivate

Thonny's configuration is located in ~/thonny/.thonny where configuration.ini may be found for changing advanced settings.