I am running the unix port of MicroPython. I needed packages such as machine etc. so I was looking on the internet. It turns out that MicroPython has a script called upip.py and I was able to install packages on this list:
https://pypi.python.org/pypi?%3Aaction= ... mit=search
So my question is: are these packages only meant for the unix port or how can I tell if I can use them on a particular port, such as ESP32 or ESP8266?
If some of these work on other ports, then how do I use upip to import the packages, say on an ESP32 system?
MicroPython packages
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython packages
You should be able to run upip on the ESP32 directly if it has access to the internet. Failing this, you'll find micropip in here. This can pull a package onto your PC for transfer to the device.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: MicroPython packages
How do I run it on ESP 32? Some sort of important command? Thanks.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython packages
First read the micropython-lib docs. Having located your package - say 'micropython-bar' - on PyPi you should be able (after connecting your device to the internet) to do:
Code: Select all
>>> import upip
>>> upip.install('micropython-bar')
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.