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
- Open PowerShell: press the Windows key, type PowerShell and press Enter.
-
Install mpremote:
If there is an issue with permissions, install it just for your account:
PS C:\Users\student> pip install mpremotePS C:\Users\student> pip install --user mpremote -
Check the install. You should see a list of the commands mpremote supports.
PS C:\Users\student> mpremote --help
macOS
- Open Terminal.
-
Install mpremote for your account:
If you installed Python with Homebrew and get an
student@MacBook ~ % python3 -m pip install --user mpremoteexternally-managed-environmenterror, use pipx instead:student@MacBook ~ % brew install pipx student@MacBook ~ % pipx install mpremote -
Check the install:
If the terminal says
student@MacBook ~ % mpremote --helpmpremote: 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, runpipx ensurepathonce and open a new terminal.
Linux
- Open a terminal.
-
Install mpremote for your account:
If your distribution blocks this with an
student@ubuntu:~$ python3 -m pip install --user mpremoteexternally-managed-environmenterror, install pipx and use it instead:student@ubuntu:~$ pipx install mpremote -
Check the install:
If the terminal says
student@ubuntu:~$ mpremote --helpmpremote: 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, runpipx ensurepathonce and open a new terminal.