-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Linux Prerequisites Installed
David Horton edited this page May 24, 2024
·
1 revision
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.
- Verify Python 3 is installed with
python3 --version
- Ward off potential "externally managed environment" errors with
sudo apt-get update && sudo apt-get install pipx
- Install mpremote utility with
pipx install mpremote
- Take pipx advice for fixing PATH environment variable with
pipx ensurepath
- Source .bashrc (or log out and back in) to update PATH,
source ~/.bashrc
- Test mpremote connection to microcontroller device with
mpremote
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.
>>>