Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
olivierdalang opened this issue Jan 14, 2022 · 1 comment
Open

Comments

@olivierdalang
Copy link

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants