Hi
I am having problems getting my Enviro to work with a Pi Zero WH which appears to otherwise work OK.
I have used a new up to date installation of Symbian and followed your instructions for installing the software for the Enviro but this throws up a number of errors.
Trying to run the Python demo program weather.py and other demos fail with the following message
pi@raspberrypi:~/enviroplus-python/examples ls
adc.py gas.py noise-amps-at-freqs.py
all-in-one-no-pm.py icons noise-profile.py
all-in-one.py lcd.py particulates.py
combined.py light.py weather-and-light.py
compensated-temperature.py luftdaten.py weather.py
pi@raspberrypi:~/enviroplus-python/examples python weather.py
Traceback (most recent call last):
File âweather.pyâ, line 4, in
from bme280 import BME280
File â/usr/local/lib/python2.7/dist-packages/pimoroni_bme280-0.0.2-py2.7.egg/bme280/init.pyâ, line 2, in
from i2cdevice import Device, Register, BitField, _int_to_bytes
ImportError: No module named i2cdevice
I would be grateful for any help.
The error messages generated during installation of the Enviro software follow
pi@raspberrypi:~ git clone https://github.com/pimoroni/enviroplus-python
Cloning into 'enviroplus-python'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 577 (delta 2), reused 7 (delta 2), pack-reused 562
Receiving objects: 100% (577/577), 358.34 KiB | 661.00 KiB/s, done.
Resolving deltas: 100% (358/358), done.
pi@raspberrypi:~ cd enviroplus-python
pi@raspberrypi:~/enviroplus-python
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âŚ
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pcâ
to the PKG_CONFIG_PATH environment variable
No package âlibffiâ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pcâ
to the PKG_CONFIG_PATH environment variable
No package âlibffiâ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory #include <ffi.h> ^~~~~~~ compilation terminated. error: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 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... Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pcâ
to the PKG_CONFIG_PATH environment variable
No package âlibffiâ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pcâ
to the PKG_CONFIG_PATH environment variable
No package âlibffiâ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pcâ
to the PKG_CONFIG_PATH environment variable
No package âlibffiâ found
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: Setup script exited with error: command âarm-linux-gnueabihf-gccâ failed with exit status 1
Setting up i2c and SPIâŚ
Backing up /boot/config.txt to /boot/config.preinstall-enviroplus-2020-38-04-15-38-36.txt
Setting up serial for PMS5003âŚ
Adding dtoverlay=pi3-miniuart-bt to /boot/config.txt