I have recently purchased an ADS1015 ADC board.
I believe I have installed the appropriate libraries but the following python code fails: from Adafruit_ADS1x15 import ADS1x15
...with the error "No module named Adafruit_ADS1x15"
All thoughts welcome.
Re: Import error for ADS1015 ADC
Re: Import error for ADS1015 ADC
Re: Import error for ADS1015 ADC
from Adafruit_ADS1x15 import ADS1x15
from Adafruit.ADS1x15 import Adafruit_ADS1x15
Re: Import error for ADS1015 ADC
Re: Import error for ADS1015 ADC
from Adafruit.ADS1x15 import Adafruit_ADS1x15
File "./TankHeight_Temp_Humdity_Sampler_test.py", line 8, in <module>
from Adafruit import Adafruit_ADS1x15
ImportError: No module named Adafruit
['adafruit-ads1x15==1.0.2', 'adafruit-gpio==1.0.3', 'adafruit-pureio==0.2.1', 'spidev==3.2']
Re: Import error for ADS1015 ADC
Re: Import error for ADS1015 ADC
rmitchell wrote:I had this problem and I finally realised that the issue was that the Raspberry Pi had both Python2 and Python3 installed. AdaFruit instructions tell you to install the library using: sudo python setup.py install
This, by default, only installs the library in Python2. If you are using Python3, you need the following installation: sudo python3 setup.py install