Enviro+ Deprecation Warning

When running the demonstration program lcd.py I get the following error message.

/home/jisaacs/enviroplus-python/examples/luftdaten.py:4: DeprecationWarning: Using “import ST7735” is deprecated. Please “import st7735” (all lowercase)!
import ST7735

When I change the library name the following error happens.

Traceback (most recent call last):
File “/home/jisaacs/enviroplus-python/examples/lcd.py”, line 21, in
disp = ST7735.ST7735(
NameError: name ‘ST7735’ is not defined



1 Like

I’d say any reference to ST7735 in the code needs to be changed to st7735. Now that you made the other edit.


I think you’ve caught us in the midst of upgrading the library to work with Pi 5/Bookworm - looks to me like the underlying libraries like st7735 have been updated but the updated Enviro examples haven’t been merged into main yet.

pip install st7735==0.0.5 to use the older version of the st7735 library might be a quick fix, or you could try the shiny new stuff by installing following these instructions :)

1 Like

@hel , there are days I’m envious of your job, and then there are days I’m not. ;)
I’m thinking that is a lot of work. =(

I’m having a similar issue but trying to resuscitate my PiZeroW by running a fresh install of Buster. The SD card died after years of (mis)use ;-)

I can get lcd.py running (with sudo) but the all-in-one.py is failing with the following:

pi@EnviroPi:~/enviroplus-python/examples $ sudo python all-in-one.py
2024-02-28 20:52:03.235 INFO all-in-one.py - Displays readings from all of Enviro plus’ sensors

Press Ctrl+C to exit!

Traceback (most recent call last):
File “/home/pi/enviroplus-python/examples/all-in-one.py”, line 38, in
pms5003 = PMS5003()
File “/usr/local/lib/python3.9/dist-packages/pms5003/init.py”, line 109, in init
self._pin_enable, self._pin_reset = gpiodevice.get_pins_for_platform(PLATFORMS)
ValueError: not enough values to unpack (expected 2, got 0)

Replying to myself as I found the following worked around the issue:

sudo pip install pms5003==0.0.5