Does not see libs in Python

Hi,
Following a rebuild & OS upgrade etc. I see the way to access the ADC card has changed.
Followed all the instructions…

Loaded the libs
Loaded smbus2

but get this error when running the demo demo_logvoltage.py.
What have I missed?

Matthew

dewoepsm@raspberrypi:~ $ python ADC-All.py
Failed to import ADCPi from python system path
Importing from parent folder instead
Traceback (most recent call last):
File “/home/dewoepsm/ADC-All.py”, line 22, in
from ADCPi import ADCPi
ImportError: cannot import name ‘ADCPi’ from ‘ADCPi’ (/usr/local/lib/python3.9/dist-packages/ADCPi/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/dewoepsm/ADC-All.py”, line 29, in
from ADCPi import ADCPi
ImportError: cannot import name ‘ADCPi’ from ‘ADCPi’ (/usr/local/lib/python3.9/dist-packages/ADCPi/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/dewoepsm/ADC-All.py”, line 31, in
raise ImportError(
ImportError: Failed to import library from parent folder

1 Like

Fixed my own issue - Need to enable IC2 interface…

1 Like

Hey Matthew,

I have run into similar problems countless times where its something not being enabled that inhibits everything from working. Glad to see you got it all sorted though!

Cheers,
Blayden

1 Like