mpremote is the official MicroPython command-line tool. It talks to the Phyduino Pico over USB, so you can work with the board from a terminal.

What mpremote does

  • Copies files to and from the board
  • Runs a script on the board without saving it
  • Opens the REPL (the interactive >>> prompt)
  • Lists, makes and deletes files and folders on the board
  • Chains several commands together in one line

All systems need Python 3 or later installed first.

Windows

  1. Open PowerShell: press the Windows key, type PowerShell and press Enter.
  2. Install mpremote:
    Windows PowerShell
    PS C:\Users\student> pip install mpremote
    If there is an issue with permissions, install it just for your account:
    Windows PowerShell
    PS C:\Users\student> pip install --user mpremote
  3. Check the install. You should see a list of the commands mpremote supports.
    Windows PowerShell
    PS C:\Users\student> mpremote --help

macOS

  1. Open Terminal.
  2. Install mpremote for your account:
    student — -zsh — 80×24
    student@MacBook ~ % python3 -m pip install --user mpremote
    If you installed Python with Homebrew and get an externally-managed-environment error, use pipx instead:
    student — -zsh — 80×24
    student@MacBook ~ % brew install pipx
    student@MacBook ~ % pipx install mpremote
  3. Check the install:
    student — -zsh — 80×24
    student@MacBook ~ % mpremote --help
    If the terminal says mpremote: command not found, the install folder (~/Library/Python/3.x/bin) isn't on your PATH. Run mpremote through Python instead, e.g. python3 -m mpremote --help, or if you used pipx, run pipx ensurepath once and open a new terminal.

Linux

  1. Open a terminal.
  2. Install mpremote for your account:
    student@ubuntu: ~
    student@ubuntu:~$ python3 -m pip install --user mpremote
    If your distribution blocks this with an externally-managed-environment error, install pipx and use it instead:
    student@ubuntu: ~
    student@ubuntu:~$ pipx install mpremote
  3. Check the install:
    student@ubuntu: ~
    student@ubuntu:~$ mpremote --help
    If the terminal says mpremote: command not found, the install folder (~/.local/bin) isn't on your PATH. Run mpremote through Python instead, e.g. python3 -m mpremote --help, or if you used pipx, run pipx ensurepath once and open a new terminal.