Errors with fresh enviroplus-python install + blank LCD

Trying to do a fresh install of enviroplus-python to a RPi Zero, I followed the steps here: https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-enviro-plus. I’m using the latest ‘Raspbian Buster with desktop and recommended software’ image as suggested, but during the install the following error is thrown:

pi@raspberrypi:~/enviroplus-python $ sudo ./install.sh
Checking for python-configparser
enviroplus 0.0.3 Python Library: Installer

Installing for Python 2…
Checking for python-pip
Checking for python-numpy
Checking for python-smbus
Checking for python-pil
Checking for python-spidev
Checking for python-rpi.gpio
Checking for libportaudio2
zip_safe flag not set; analyzing archive contents…
package init file ‘src/doc/init.py’ not found (or not a regular file)
package init file ‘src/test/init.py’ not found (or not a regular file)
File “build/bdist.linux-armv6l/egg/astral/geocoder.py”, line 428
def database() -> LocationDatabase:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/main.py”, line 38
kwargs: Dict[str, Any] = {}
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/location.py”, line 23
def init(self, info: Optional[LocationInfo] = None):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/moon.py”, line 11
def _phase_asfloat(date: datetime.date) -> float:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/init.py”, line 78
def now(tzinfo: datetime.tzinfo = pytz.utc) -> datetime.datetime:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/sun.py”, line 47
def proper_angle(value: float) -> float:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/almost_equal.py”, line 6
def datetime_almost_equal(datetime1: datetime, datetime2: datetime, seconds: int = 60):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/test_norway.py”, line 10
def _next_event(obs: astral.Observer, dt: datetime, event: str):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/test_sun_calc.py”, line 18
def test_JulianDay(day: datetime.date, jd: float):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/conftest.py”, line 9
def test_database() -> LocationDatabase:
^
SyntaxError: invalid syntax

zip_safe flag not set; analyzing archive contents…
Done!

Installing for Python 3…
Checking for python3-pip
Checking for python3-numpy
Checking for python3-smbus
Checking for python3-pil
Checking for python3-spidev
Checking for python3-rpi.gpio
Checking for libportaudio2
zip_safe flag not set; analyzing archive contents…
Done!

Setting up i2c and SPI…
Backing up /boot/config.txt to /boot/config.preinstall-enviroplus-2020-28-29-10-28-23.txt

Setting up serial for PMS5003…
Adding dtoverlay=pi3-miniuart-bt to /boot/config.txt

Adding dtoverlay=adau7002-simple to /boot/config.txt

Would you like to copy examples to /home/pi/Pimoroni/enviroplus? [y/N] y
Copying examples to /home/pi/Pimoroni/enviroplus

All done!
If this is your first time installing you should reboot for hardware changes to take effect.

Find uninstall steps in /home/pi/Pimoroni/enviroplus/uninstall.sh

pi@raspberrypi:~/enviroplus-python $ sudo reboot

Running python lcd.py and python all-in-one.py I can see the LCD turn on and light up, but it’s just blank. I ran sudo apt-get update and sudo apt-get upgrade before and after install, but I’ve also tried not doing that. When I run python all-in-one.py I DO get the temperature print out in the console window.

Is there something obvious I’m missing?

I’ve also tried using curl -sSL https://get.pimoroni.com/enviroplus | bash, which installed without error, but when I run a couple of the examples that use the LCD, I get:

pi@raspberrypi:~/Pimoroni/st7735/examples $ python image.py cat.jpg

image.py - Display an image on the LCD.

If you’re using Breakout Garden, plug the 0.96" LCD (SPI)
breakout into the rear slot.

Traceback (most recent call last):
File “image.py”, line 46, in
spi_speed_hz=4000000
File “/usr/local/lib/python2.7/dist-packages/ST7735/init.py”, line 156, in init
self._spi = spidev.SpiDev(port, cs)
IOError: [Errno 2] No such file or directory
pi@raspberrypi:~/Pimoroni/st7735/examples python scrolling-text.py Traceback (most recent call last): File "scrolling-text.py", line 18, in <module> spi_speed_hz=10000000 File "/usr/local/lib/python2.7/dist-packages/ST7735/__init__.py", line 156, in __init__ self._spi = spidev.SpiDev(port, cs) IOError: [Errno 2] No such file or directory pi@raspberrypi:~/Pimoroni/st7735/examples

Thanks in advance for any help.

Try this instead of the clone
curl -sSL https://get.pimoroni.com/enviroplus | bash

Thanks, but I tried that too already (2nd half of my message above) - installs without error, but the LCD comes on just blank

Ok, I missed that somehow, ops.
Double check that SPI is enabled in Raspberry Pi Configuration, or run raspi-config from terminal to do it if your running Buster Lite.

EDIT: This is my thread on getting that LCD to work. The one used by the Enviro + is the smaller 0.96" colour LCD (160x80). Still might help though.

Same thing unfortunately :(

I also did a fresh install with the full desktop with recommended software, then using the curl command the same syntax error comes up part way through. I also checked that SPI was enabled through sudo raspi-config and rebooted. I’m out of ideas :)

pi@raspberrypi:~ $ curl -sSL https://get.pimoroni.com/enviroplus | bash

This script will install everything needed to use
Enviro+

Always be careful when running scripts and commands copied
from the internet. Ensure they are from a trusted source.

If you want to see what this script does before running it,
you should run: ‘curl https://get.pimoroni.com/enviroplus-python

Do you wish to continue? [y/N] y

Checking environment…
Updating apt indexes…

Checking hardware requirements…

Checking for dependencies…

Cloning Github repo locally…
Cloning into ‘enviroplus-python’…
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 51 (delta 14), reused 22 (delta 9), pack-reused 0
Unpacking objects: 100% (51/51), done.

Finalising Install…

Checking for python-configparser
enviroplus 0.0.3 Python Library: Installer

Installing for Python 2…
Checking for python-pip
Checking for python-numpy
Checking for python-smbus
Checking for python-pil
Checking for python-spidev
Checking for python-rpi.gpio
Checking for libportaudio2
zip_safe flag not set; analyzing archive contents…
package init file ‘src/doc/init.py’ not found (or not a regular file)
package init file ‘src/test/init.py’ not found (or not a regular file)
File “build/bdist.linux-armv6l/egg/astral/geocoder.py”, line 428
def database() -> LocationDatabase:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/main.py”, line 38
kwargs: Dict[str, Any] = {}
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/location.py”, line 23
def init(self, info: Optional[LocationInfo] = None):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/moon.py”, line 11
def _phase_asfloat(date: datetime.date) -> float:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/init.py”, line 78
def now(tzinfo: datetime.tzinfo = pytz.utc) -> datetime.datetime:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/astral/sun.py”, line 47
def proper_angle(value: float) -> float:
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/almost_equal.py”, line 6
def datetime_almost_equal(datetime1: datetime, datetime2: datetime, seconds: int = 60):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/test_norway.py”, line 10
def _next_event(obs: astral.Observer, dt: datetime, event: str):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/test_sun_calc.py”, line 18
def test_JulianDay(day: datetime.date, jd: float):
^
SyntaxError: invalid syntax

File “build/bdist.linux-armv6l/egg/test/conftest.py”, line 9
def test_database() -> LocationDatabase:
^
SyntaxError: invalid syntax

zip_safe flag not set; analyzing archive contents…
Done!

Installing for Python 3…
Checking for python3-pip
Checking for python3-numpy
Checking for python3-smbus
Checking for python3-pil
Checking for python3-spidev
Checking for python3-rpi.gpio
Checking for libportaudio2
zip_safe flag not set; analyzing archive contents…
Done!

Setting up i2c and SPI…
Backing up /boot/config.txt to /boot/config.preinstall-enviroplus-2020-14-29-15-14-33.txt

Setting up serial for PMS5003…
Adding dtoverlay=pi3-miniuart-bt to /boot/config.txt

Adding dtoverlay=adau7002-simple to /boot/config.txt

Would you like to copy examples to /home/pi/Pimoroni/enviroplus? [y/N] y
Copying examples to /home/pi/Pimoroni/enviroplus

All done!
If this is your first time installing you should reboot for hardware changes to take effect.

Find uninstall steps in /home/pi/Pimoroni/enviroplus/uninstall.sh

Some changes made to your system require
your computer to reboot to take effect.

Would you like to reboot now? [y/N] N

pi@raspberrypi:~ $

I’m no expert on this but it kind of sounds like the github repo is corrupted?
I think I would contact Pimoroni about it via this link
https://shop.pimoroni.com/pages/contact-us
I would put a link to this thread in that e-mail.

2 Likes

Turns out it was a faulty LCD on the board - Pimoroni were great at shipping me a replacement which works as expected :)

Top Notch, that’s great to hear. Now you can enjoy your new tech and have some fun. =)

1 Like