Followed instructions https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-bme680-breakout but can’t get a reading from the sensor. I get “ImportError: No Module Named smbus”
I am not sure what directory I was meant to run the following code:
git clone https://github.com/pimoroni/bme680
sudo python setup.py install
I am quite new to all this. Any help would be great
I do believe if you run
curl https://get.pimoroni.com/bme680 | bash you don’t have to do the setup.py install. It’s all done for you. You just do up your code in python.
If you are doing it manually make sure you enable i2c in Raspberry Pi configuration. The one line installer does this for you but if your doing the manual install you have to enable it yourself. Also if you plan on using python 3, run
sudo python3 setup.py install
If you open the terminal window, you just run
cd bme680/library from the default directory it opens from. That’s all I’ve ever done with stuff like this.
https://github.com/pimoroni/bme680 scroll down to the readme.md section
smbus is available via apt:
sudo apt install python-smbus python3-smbus
I followed all the instructions and have made sure the i2c is enabled. But it didn’t work, Thanks for trying
I will try that tomorrow thanks
Thanks I needed to do this as well, apparently. Maybe worth adding into the script?
How many of you are running Raspbian Lite?
It appears smbus and pip are not included in the current Lite version of Raspbian. I “think” this was a change made to the Buster release?
They may have removed Python 2 in the buster release. Try pip3?
I seem to remember some discussion going on about python 2 and the Buster release on the Pi foundation forum. I’ll have to go revisit it before commenting any further though. My memory isn’t what it used to be. :(