BME280 not found error

I’ve been having problems with the BME 280 breakout board getting it to run on my PI 3B+ and have found that if I install the current lib version 0.1.1 I get a module not found error. I installed version 0.0.2 and the board now works fine.

What version of Python are using, Python 2 or Python 3?
I have several BME280’s here that run without error in Python 3.
I run
sudo pip install pimoroni-bme280 smbus
sudo pip3 install pimoroni-bme280 smbus

I’m using version 3 of Python, I’ve seen a couple of posts on other forums where the latest version of the library has caused problems which were resolved by installing the previous version as I did.

To be honest, I’m not sure what version library I’m running. My installs were done a fair bit ago.
I have a BME280 in a Breakout Garden Hat I can borrow and plug into my Pi 400. And run the installer and see what happens. I’ll post back my results. It will be a few hours before I can test it, I have some other stuff I have to take care of first.

I ran
sudo pip install pimoroni-bme280 smbus
sudo pip3 install pimoroni-bme280 smbus
which installed bme280-0.1.1
I then ran the From Thonny which was set to Python 3.3.7.
It ran fine with no errors.

I’m running them from Debian lite using sudo python3 /home/pi/ and this only works with the old version 0.0.2 library.

A bit more experimenting and I’ve found that running the script in Thonny works OK, but run it in Geany and it fails.

sudo python3 /home/pi/ ran OK for me. Also worked from Geany.

EDIT: Pi 400 latest Pi OS with Desktop fully updated.

Still can’t get it to run in Geany on two different OS installs but runs OK from Thonny and the CLI. Very strange.

I’m not sure what is going on on your end. It’s all working OK for me?

EDIT: More than happy to try something on my system to help sort it out.