Closed Nicchessla closed 1 year ago
Can you post the error traceback?
I'm having the same issue. Please see below:
MPY: soft reboot
Chip id: RP2040
Board id: RASPBERRY_PI_PICO
Traceback (most recent call last):
File "<stdin>", line 12, in <module>
File "/lib/displayio/__init__.py", line 20, in <module>
ImportError: no module named 'typing'
@makermelissa should the Pico be able to support importing of typing
like the Pi proper does? Here's the relevant line: https://github.com/adafruit/Adafruit_Blinka_Displayio/blob/61102c93bfb90fbccc4bc21122444531ebe2dd84/displayio/__init__.py#L20
@tekktrik I'm not sure, but if there is an option of not requiring it, that would be ideal since there's already so little extra space.
I'm more surprised because I don't think typing
exists and I'm surprised it might only be an issue now. I can do some more digging.
Is displayio even compatible with Micropython ? It has seemingly never been tested there, has it ? It's not an issue to use typing without guards in a library that is not supported on MP. This should probably be an issue in https://github.com/adafruit/Adafruit_Blinka_Displayio
Issue transferred and name updated!
Is displayio even compatible with Micropython ? It has seemingly never been tested there, has it ? It's not an issue to use typing without guards in a library that is not supported on MP. This should probably be an issue in https://github.com/adafruit/Adafruit_Blinka_Displayio
I don't know why I didn't even think about that sooner. Yeah, this library will not run on MicroPython. It requires the Pillow library and I'm fairly sure you need a single board computer for that.
Is it fair to close this then? Or should there be any action item?
I don't know why I didn't even think about that sooner. Yeah, this library will not run on MicroPython. It requires the Pillow library and I'm fairly sure you need a single board computer for that.
Displayio is part of CircuitPython, yes? So even if I use CircuitPython on my Raspberry Pi Pico it wouldn't work?
Blinka Display IO relies on C python libraries, particularly pillow, in order to function. It isn't designed to run on the Pico.
Displayio is part of CircuitPython, yes? So even if I use CircuitPython on my Raspberry Pi Pico it wouldn't work?
To clarify, you can use displayio if you run Circuitpython instead of Micropython, as it is a builtin library of CP. It's a display and graphics library that needs low level access and optimizations. I don't know what Micropython has to offer as graphics libraries, but I believe it has LVGL bindings that can be compiled in (maybe not by default), which you could use independently of whatever blinka libraries you need (like adafruit sensor drivers).
I think now I get it. Blinka is really created for single board computers, and not microcontrollers, right? So, running python with Blinka, displayio would work because of the python libraries mentioned like pillow. Blinka also works in Micropython on a microcontroller but I guess only very limited then. is this correct?
@Nicchessla Blinka runs fine on MicroPython. It was really this library that was created for SBCs.
Closing as this is pretty much written for linux and not micropython. It would be better to better to either use MicroPython's RGB Display library or go with CircuitPython instead.
I am trying to run adafruits HX8357 display with the raspberry pico, running micropython using Blinka. when I import displayio I get the error above