pi_ina219: Library is not compatible with Python 3
These errors occur:
Traceback (most recent call last):
File "example.py", line 4, in <module>
from ina219 import INA219
File "/home/pi/pi_ina219/ina219.py", line 7, in <module>
import Adafruit_GPIO.I2C as I2C
ImportError: No module named 'Adafruit_GPIO'
and:
File "example.py", line 14
print "Bus Voltage : %.3f V" % ina.voltage()
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Fix Issue #2 - Python 3 compatibility — committed to chrisb2/pi_ina219 by chrisb2 7 years ago
On a new installation of Raspbian I did:
So from this is does look like your system is to blame. So reinstalling Rasbian will work.
Chris
On Sun, Mar 4, 2018 at 12:06 PM, GawiQ notifications@github.com wrote:
To install dependencies for Python 3 on Raspberry Pi, this need to be executed:
sudo python3 -m pip install git+git://github.com/chrisb2/pi_ina219.gitthis fixes the import error above.