Skip to content

Getting Linux Prerequisites Installed

David Horton edited this page May 24, 2024 · 1 revision

Installing MPRemote on Linux (Debian-based)

Prerequisites

The instructions here assume a couple things:

  • You have access to a Linux device and sudo permissions.
  • You have a microcontroller device flashed with MicroPython for testing.

High-level procedure

  1. Verify Python 3 is installed with python3 --version
  2. Ward off potential "externally managed environment" errors with sudo apt-get update && sudo apt-get install pipx
  3. Install mpremote utility with pipx install mpremote
  4. Take pipx advice for fixing PATH environment variable with pipx ensurepath
  5. Source .bashrc (or log out and back in) to update PATH, source ~/.bashrc
  6. Test mpremote connection to microcontroller device with mpremote

Successful Setup and Test

This shows the commands and expected output. Most output is trimmed for brevity.

$ python3 --version
Python 3.11.2

$ sudo apt-get update
Reading package lists... Done

$ sudo apt-get install pipx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:

$ pipx install mpremote
  installed package mpremote 1.22.0, installed using Python 3.11.2

$ pipx ensurepath
Success! Added /home/pi/.local/bin to the PATH environment variable.

$ source ~/.bashrc

$ mpremote
Connected to MicroPython at /dev/ttyUSB0
Use Ctrl-] or Ctrl-x to exit this shell
MicroPython v1.21.0 on 2023-10-06; ESP32C3 module with ESP32C3
Type "help()" for more information.
>>>
Clone this wiki locally