Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named Adafruit_BMP #4

Open
ash73 opened this issue Jan 31, 2017 · 7 comments
Open

No module named Adafruit_BMP #4

ash73 opened this issue Jan 31, 2017 · 7 comments

Comments

@ash73
Copy link

ash73 commented Jan 31, 2017

Hi, I'm using a BMP180 sensor with a Raspberry Pi3 and the sample python program works ok in Python 2, but I get this error in Python 3:

import Adafruit_BMP.BMP085 as BMP085
ImportError: No module named 'Adafruit_BMP'

I'm new this; is it possible to get it working in Python 3? TIA

@sunfounder
Copy link
Collaborator

Sorry the codes are all for Python 2, not Python 3 temporarily. It is possible to run the code in Python 3, for more information, you can it check out in Python.org but it might be a lot of work.

@smalhao
Copy link

smalhao commented Jul 30, 2018

I have the same problem, with example file simpletest.py works but when i run my program with sockets the error is this:

Traceback (most recent call last):
File "sensorServer.py", line 2, in
import Adafruit_BMP.BMP085 as BMP085
ImportError: No module named 'Adafruit_BMP'

@ash73
Copy link
Author

ash73 commented Jul 31, 2018

Try:

sudo apt-get install python-smbus i2c-tools
sudo apt-get install build-essential python-dev python-smbus
cd ~
git clone https://github.com/sunfounder/Adafruit_Python_BMP.git
cd Adafruit_Python_BMP
python3 setup.py install
cd BMP180/SunFounder_SensorKit_for_RPi2/Python/
python3 31_barometer.py

Back then I didn't know there are separate install commands for Py2 and Py3.

@sunfounder
Copy link
Collaborator

sunfounder commented Jul 31, 2018 via email

@sunfounder
Copy link
Collaborator

sunfounder commented Aug 1, 2018 via email

@sunfounder
Copy link
Collaborator

sunfounder commented Aug 2, 2018 via email

@smalhao
Copy link

smalhao commented Aug 2, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants