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

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

Open
marcelgasser opened this issue Jan 15, 2023 · 1 comment
Open

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

marcelgasser opened this issue Jan 15, 2023 · 1 comment

Comments

@marcelgasser
Copy link

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.

jath03 added a commit to jath03/adafruit-beaglebone-io-python that referenced this issue Mar 31, 2023
@omerk
Copy link
Contributor

omerk commented Apr 22, 2023

Just raised a PR that fixes this issue: #366

As a temporary fix, and for the benefit of folks arriving from Google searches: I've modified my requirements.txt and point to my fork with: git+https://github.com/omerk/adafruit-beaglebone-io-python.git@master#egg=Adafruit-BBIO (When the PR gets merged and a new release is cut, this becomes unnecessary and can be ignored.)

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