Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Python • Cannot find BME280 module

$
0
0
Problem with python program reading the Pimoroni BME280 sensor.
The program was lifted from an old Pi, and has no problem running on a legacy OS

Trying to run on Pi5, Pi OS Bookworm Full version, fully updated.
I've had the learning curve of VENV, rather steep because I didn't know if that was the source of error!

Modules I've installed, into a virtual environment:-
sudo pip install pimoroni-bm280 smbus
sudo pip install openpyxl

I've (separately) also loaded them system wide, with
sudo apt install python3-bme280
etc

Th eprogram has lines:-
from openpyxl import Workbook
from smbus import SMBus
from bme280 import BME280

Running via Thonny, the first two imports are ok, last line fails 'cannot find bme280 in BME280'
(No difference if upper or lower case used)
After each failure I have cleaned up, removing the virtual environment completely.
I have searched forums etc, my wall is damaged and my head aching from too much contact
Assistance please.

Statistics: Posted by Owchita — Thu Aug 07, 2025 6:56 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles