Installing a Python package

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Installing a Python package

Post by pythoncoder » Mon Dec 05, 2016 7:24 am

I guess I'm being dumb here, but how should this be done on the Pyboard? The obvious method of copying the directory structure to an SD card, fitting it to the Pyboard and importing the library doesn't work, at least in the case of the uasyncio library http://forum.micropython.org/viewtopic.php?f=3&t=2733. Any pointers gratefully received ;)
Peter Hinch
Index to my micropython libraries.

pagano.paganino
Posts: 89
Joined: Fri Sep 11, 2015 10:47 pm
Location: Italy

Re: Installing a Python package

Post by pagano.paganino » Mon Dec 05, 2016 10:11 am


User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Installing a Python package

Post by pythoncoder » Mon Dec 05, 2016 2:24 pm

Indeed, thanks to @pagano.paganino I've now installed it and explained the method. I'd be interested to know if this is the officially approved procedure for installing packages on the Pyboard.
Peter Hinch
Index to my micropython libraries.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Installing a Python package

Post by pythoncoder » Wed Dec 07, 2016 7:45 am

The response from @Damien to my query on GitHub was:
"You could also mount the device and use the "-p" option to upip to specify the target directory as the mounted filesystem."

To my question about platform independence:

"The unix version should run on OSX, and the windows version on windows. You should also be able to use CPython's pip to install the files (to a local dir) and then copy them over. Apart from that I don't know an easier way."
Peter Hinch
Index to my micropython libraries.

Post Reply