Skip to content

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

Open

Description

@olivierdalang

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.

Activity

  1. trainman419 commented on Jan 16, 2022

    @trainman419
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions