Page 1 of 1

[SOLVED] How to install libraries in MicroPython (ESP8266)?

Posted: Sun Feb 12, 2017 2:28 pm
by Suhanko
Hello, guys. I'm newbie related to install packages in MicroPython. I saw I can enable WEBREPL calling "import import webrepl_setup". Is there something like that to use MQTT? Do some documentation about package installing?

Thanks.

Re: How to install libraries in MicroPython (ESP8266)?

Posted: Wed Feb 15, 2017 1:24 pm
by demoontz
hi.
according to https://github.com/micropython/micropython-lib just use in REPL:
>>> import upip
>>> upip.install("micropython-struct")
it puts files to /lib
u can put ur own lib to this folder. it one .py file. u can use mpfshell for upload files.

Re: How to install libraries in MicroPython (ESP8266)?

Posted: Thu Feb 16, 2017 4:12 pm
by Suhanko
I thank you very very much!!!

Re: How to install libraries in MicroPython (ESP8266)?

Posted: Mon Feb 20, 2017 12:58 pm
by demoontz
but u can be i stuck with memory allocation error. so best way to get modules into firmware.(frozen modules)