trainman419 / python-cec

Other
172 stars 42 forks source link

`Illegal instruction` on import on raspberry pi after pip install #60

Open olivierdalang opened 2 years ago

olivierdalang commented 2 years ago

Hi !

Python crashes on import cec on my freshly installed raspberry pi zero on raspbian, with the library installed through pip.

Here are the steps to reproduce.

System: Raspbian GNU/Linux 11 (bullseye) Model: Raspberry Pi Zero W Rev 1.1

$ sudo apt-get install libcec-dev build-essential python3-dev python3-pip
...

$ pip install cec
...

$ python -c "import cec"
Illegal instruction
# exit code 132

Note that it seems to work when built locally.

trainman419 commented 2 years ago

That's weird. I released version 0.2.8 to pypi recently, so the version that you install through pip and the source version should be the same.

(I assume your default python interpreter is python 3)

I wonder if you're importing a different version of the cec module from the one that was installed through pip. libcec has recently started shipping their own module, also named cec.

To see which path it's trying to import, run:

python -c "import pkgutil; c = pkgutil.get_loader('cec'); print(c.path);"

If that isn't from /usr/local/python , then you're probably getting a different package.