Getting started with Adafruit_BBIO - pip install failing

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
stlentz
 
Posts: 13
Joined: Wed Oct 23, 2019 3:09 pm

Getting started with Adafruit_BBIO - pip install failing

Post by stlentz »

I have a new BBB and have installed the Buster IoT image 2020-04-06. I am following the instructions here:

https://learn.adafruit.com/setting-up-i ... -on-ubuntu

However, sudo pip install Adafruit_BBIO is failing at the arm-linux-gnueabinhf-gcc step with numerous errors starting with this:

source/py_gpio.c:558:14: error: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Werror=cast-function-type]

Any idea what I am missing?

Let me know if you want the full error dump.

Thanks in advance for any help.

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Getting started with Adafruit_BBIO - pip install failing

Post by drewfustini »

I need to try to reproduce this myself to see what the cause is.

However, one guess is that it is using Python 2 and not Python 3.

Can you try pip3 instead?

Thanks

User avatar
stlentz
 
Posts: 13
Joined: Wed Oct 23, 2019 3:09 pm

Re: Getting started with Adafruit_BBIO - pip install failing

Post by stlentz »

Hmm, that's interesting:

debian@beaglebone:/var/lib/cloud9$ sudo pip3 install Adafruit_BBIO
[sudo] password for debian:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: Adafruit_BBIO in /usr/local/lib/python3.7/dist-packages/Adafruit_BBIO-1.1.1-py3.7-linux-armv7l.egg (1.1.1)
debian@beaglebone:/var/lib/cloud9$

I guess I can get on with using it then.

And yes, pip was using Python 2.7.

Thanks for looking at this, might want to update the old tutorial pages.

User avatar
sam_bristow
 
Posts: 1
Joined: Wed Jul 15, 2020 1:02 am

Re: Getting started with Adafruit_BBIO - pip install failing

Post by sam_bristow »

The issue you are seeing is because the package on PyPI hasn't been updated in quite a while and is missing some fixes for newer compilers.

In particular https://github.com/adafruit/adafruit-be ... issues/308

You could grab the latest version from github which should work, otherwise it's a matter of waiting for a new build to be uploaded to PyPI (I've opened a ticket for this).

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Getting started with Adafruit_BBIO - pip install failing

Post by drewfustini »

Thanks for raising this issue. I'll make a new release.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”