Open TAYALE opened 9 months ago
I am getting the following when I run the script from console:
user@host: ~/system_sensors $ system_sensors_venv/bin/python3 src/system_sensors.py src/settings.yaml Unable to import apt package. Available updates will not be shown. Sending config message to host... Connected to broker subscribing : hass/status
The second line is the error. I am trying to learn how to import "apt" into the virtual environment. That might fix this issue.
I found this... At this link: https://www.raspberrypi.com/documentation/computers/os.html#using-pip-with-virtual-environments it says to start the virtual environment using this command:
python -m venv --system-site-packages env.
I used:
python3 -m venv system_sensors_venv --system-site-packages
and this has cleared the error.
YMWV. :)
Thanks.
Bookworm expects an VirtualEnv. Created it and changed the ExecStart in the service-file to: /root/system_sensors/.venv/bin/python3 /root/system_sensors/src/system_sensors.py /root/system_sensors/src/settings.yaml
I do get a lot of sensors but not the 'Available updates' and cannot figure out why. Of course it is set to true in the settings.yaml.