Skip to content

sudo pip3 install Adafruit_BBIO fails on Python >= 3.9 #362

Open
@marcelgasser

Description

@marcelgasser

I tried to install Adafruit_BBIO on a the am335x-debian-11.5-minimal-armhf-2022-11-01-2gb.img.xz image, but ran into to the following error:
cmd_log.txt

It turns out py_gpio.c has a dependency on python 3.7 api call PyEval_ThreadsInitialized

Modifying py_gpio.c by inserting the following lines before py_gpio.c L602:

#if PY_VERSION_HEX >= 0x03070000 && !defined(PyEval_ThreadsInitialized)
#define PyEval_ThreadsInitialized() 1
#endif

And manually installing the lib succeeded (although still showing warnings during build, but no errors).

Not sure if this is the proper way to fix this but it help me getting it to work after trying several workarounds. First downgrading the kernel to 4.19, trying Adafruit-Blinka (which in turn depends on Adafruit_BBIO), trying pyenv with python 3.7 which I messed up...

Would be nice if this lib gets some love & care since RasPis are hard to come by these days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions