Problems with Enviro+ install

Hi
I am trying to run the install for enviro+ on my pi and am getting the following errors:
When i try to run any of the examples code it doesnt work.
I have done an upgrade

Help advice much appreciated

Python 3.4.2 (default, Sep 16 2019, 19:58:00)
[GCC 4.9.2] on linux
Type “copyright”, “credits” or “license()” for more information.

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-cffi
Checking for python-spidev
Checking for python-rpi.gpio
Checking for libportaudio2
Traceback (most recent call last):
File “setup.py”, line 31, in
raise RuntimeError(“Package setuptools must be at least version {}”.format(minimum_version))
RuntimeError: Package setuptools must be at least version (‘00000030’, ‘00000004’, ‘*final’)
Installing for Python 3…
Checking for python3-pip
Checking for python3-numpy
Checking for python3-smbus
Checking for python3-pil
Checking for python3-cffi
Checking for python3-spidev
Checking for python3-rpi.gpio
Checking for libportaudio2
Traceback (most recent call last):
File “setup.py”, line 25, in
from setuptools import setup, version
File “/usr/local/lib/python3.4/dist-packages/setuptools/init.py”, line 16, in
import setuptools.version
File “/usr/local/lib/python3.4/dist-packages/setuptools/version.py”, line 1, in
import pkg_resources
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 81, in
raise RuntimeError(“Python 3.5 or later is required”)
RuntimeError: Python 3.5 or later is required
Setting up i2c and SPI…
Backing up /boot/config.txt to /boot/config.preinstall-enviroplus-2021-01-21-19-56-57.txt

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

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

Best guess is an update to PiOS has broken something. There have been some big changes come down the pip lately and new images released.
Reporting it as an issue on github may get you a faster response.
Issues · pimoroni/enviroplus-python (github.com)

Python 3.4.2 (default, Sep 16 2019, 19:58:00)

RuntimeError: Python 3.5 or later is required

So it seems you need to update Python. I’m not sure what the default version of Python is on Pi OS at the moment, but I thought it was later than 3.4? How old is your install of Pi OS?

Nice catch @Shoe I totally missed that. I guess I shouldn’t be doing this so early in the morning 5AM here, yawn.

Sorry new to this, how do I upgrade python? I have inherited a Pi that is at least a few years old.
Would it be easier to upgrade the Pi OS?

Couldn’t hurt to run
sudo apt update
sudo apt upgrade - y
And ir that doesn’t work
sudo apt full-upgrade

Or just reimage your sd card with the latest. PiOS

Raspberry Pi OS – Raspberry Pi