0

Adafruit_BBIO ImportError: cannot import name ADC
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit_BBIO ImportError: cannot import name ADC

by jhalpin on Fri Mar 03, 2017 1:26 pm

I've installed the newest version (1.0.3) with 'pip install Adafruit_BBIO', but it can't find the ADC module. In fact there is no ADC.py installed.

bbb4g# locate ADC
/lib/firmware/PyBBIO-ADC-00A0.dtbo
/usr/local/lib/python2.7/dist-packages/Adafruit_BBIO/ADC.so


This is on Beaglebone Black, debian 7.8. I've seen some posts about needing a newer kernel to initialize ADC, but that's not what this is. Python can simply not find the ADC module:

#!/usr/bin/python
import sys

sys.path.append('/usr/local/lib/python2.7/dist-packages/Adafruit_BBIO')

from Adafruit_BBIO import ADC as adc



Gives this result:

bbb4g$ test.py
Traceback (most recent call last):
File "/home/jhalpin/bin/test.py", line 6, in <module>
from Adafruit_BBIO import ADC as adc
ImportError: No module named Adafruit_BBIO


I'm guessing this isn't unique to me. Has anyone here figured this out yet?

Thanks

Joe

jhalpin
 
Posts: 14
Joined: Fri Jul 17, 2015 7:26 pm

Re: Adafruit_BBIO ImportError: cannot import name ADC

by drewfustini on Sat Mar 04, 2017 3:09 pm

Thanks for reporting this issue. I've not seen it before.

pip install Adafruit_BBIO is the preferred way to install Adafruit_BBIO. The expectation is that it should work on both the Debian 7.x (Wheezy) and Debian 8.x (Jessie) images.

I don't have Debian 7.8 image on hand to replicate your steps, but I will download it and repeat your steps.

In the meantime, please try installing Adafruit_BBIO from the GitHub repo:
git clone git://github.com/adafruit/adafruit-beag ... python.git
cd adafruit-beaglebone-io-python
sudo python setup.py install

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

Re: Adafruit_BBIO ImportError: cannot import name ADC

by jhalpin on Sun Mar 05, 2017 12:14 pm

Last night I re-loaded my Beaglebone with debian 7.11. Everything seems ok with this version.

Thanks

Joe

jhalpin
 
Posts: 14
Joined: Fri Jul 17, 2015 7:26 pm

Re: Adafruit_BBIO ImportError: cannot import name ADC

by drewfustini on Mon Mar 06, 2017 4:43 am

Good to hear. Thanks for the update.

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

Please be positive and constructive with your questions and comments.