Enviro+ bme280 Library import in Weather.py

I have just received an Enviro+ and following the “Getting started” instructions. I am using a Pi Zero running Raspbian Jessie. When I try to run the weather.py example I get the following

pi@raspberrypi:~/enviroplus-python/examples $ python weather.py
Traceback (most recent call last):
File “weather.py”, line 4, in
from bme280 import BME280
ImportError: No module named bme280

Looks like I need to install the bme280 library manually as it does not happen during the install script.

git clone https://github.com/pimoroni/enviroplus-python
cd enviroplus-python
sudo ./install.sh

Where do I get the bme280 library?

Fixed!!

Found a Pimoroni bme280 library in github and installed it from there.For anyone else having this problem. Install the library as per the following.

git clone https://github.com/pimoroni/bme280-python
cd bme280-python
sudo ./install.sh

I also found you have to manually install the light and the PMS5003 libraries. The gas library is missing and can’t find it in the list of libraries.

Cheers

curl -sSL https://get.pimoroni.com/enviroplus | bash

Should install everything needed?

Thanks. Will give it a go.

Maybe the tutorial which uses

git clone https://github.com/pimoroni/enviroplus-python
cd enviroplus-python
sudo ./install.sh

needs to be updated. Many hours wasted.

This is really bizarre, since the bme280 library is a dependency of the enviroplus installer… oh dear I wonder if I’ve broken something by having the install_requires in setup.py but also having a setup.cfg

Yes

curl -sSL https://get.pimoroni.com/enviroplus | bash
works with all libraries now accessible.

Bit hard to keep my mind on this topic with the poms in a good position against the aussies in the World Cup at the moment. Cheers

Thats good to hear. Now you can have some fun with your Enviro +.

I’ve updated the library’s setup.cfg to - hopefully - prevent this happening. This is what I get for rolling out experimental packaging improvements to a popular new software repository.

Phil, I for one appreciate everything you do. Making mistakes just proves your human, lol. :P =)