pimoroni / displayhatmini-python

Python library for the Pimoroni Display HAT Mini
https://shop.pimoroni.com/products/display-hat-mini
MIT License
30 stars 7 forks source link

Illegal Instruction #8

Closed Sebwap closed 1 year ago

Sebwap commented 2 years ago

Hello there,

Since a few day, I'v got an "Illegal Instruction" return with all my scripts using displayhatmini library. It's exactly the same with provided examples.

> pi@pizerowh:~/displayhatmini/displayhatmini-python/examples $ python3 pong.py
> Illegal instruction
> pi@pizerowh:~/displayhatmini/displayhatmini-python/examples $ python3 --version
> Python 3.7.3

All my python pacakges are up to date.

Any idea ?

Sebwap commented 2 years ago

Update: problem occurs when I import the lib:

pi@pizerowh:~ $ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import displayhatmini
Illegal instruction
pi@pizerowh:~ $
Gadgetoid commented 2 years ago

Try:

import spidev

and

import RPi.GPIO

Individually, since the displayhatmini library does not include any C code that could fail with this error.

Basically "Illegal Instruction" is what happens when you try to load code incompatible with your architecture. I'm not sure how it might have come to be installed in the first place, but a good start would be to find out which package is exploding.

Sebwap commented 2 years ago

Thanks for your reply. Indeed, the problem doesn't seem to be related to displayhatmini specifically.

I will try to find the guilty library tonight.

Sebwap commented 2 years ago

A downgrade from Pillow 9.0.0 to Pillow 8.4.0 solve partially the problem. psutil is still not working, I suppose I have to get another old version of it.

Sebwap commented 2 years ago

Well it seem that Pillow 9 and psutil 5.9 are not yet compatible with Raspbian bullseye on zero at least :/