Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: JonHylands on November 17, 2020, 06:01:35 PM
-
Hi everyone,
First post here, I'm trying to set up piCore on a rpi zero w, and I need to access a usb-based serial port. I see there is support for pyserial in python 2, but all my robot code (which I've already written) runs in python 3. I'm running piCore 9.0.3.
What is the easiest way to get pyserial available in python 3.6?
Thanks,
Jon
-
You can compile pyserial for python3.6 in piCore-9.x with:
$ tce-load -i compiletc python3.6-dev
$ wget https://github.com/pyserial/pyserial/archive/v3.4.tar.gz
$ tar xf v3.4.tar.gz
$ cd pyserial-3.4
$ python3.6 setup.py build
$ sudo python3.6 setup.py install --root=/tmp/pkg
..and then make an extension out of the files under /tmp/pkg
-
..and then make an extension out of the files under /tmp/pkg
I managed to build & install, but this part has me scratching my head a bit. The instructions I've found seem overly complex. Are there clear instructions anywhere?
Thanks,
Jon
-
...
$ cd /tmp
$ tce-load -i squashfs-tools
$ sudo mksquashfs pkg/ py3.6serial.tcz