On a headless Raspberry Pi, you'll need to install python3 Pip before install of Metrics2MQTT:
sudo apt install python3-pip -y
Additionally, Metrics2MQTT installation requires sudo, and in versions from Debian Bookworm onwards, does not install. It needs a virtual environment such as 'venv' (best practice).
A workaround is to use '--break-system-packages':
sudo pip3 install metrics2mqtt --break-system-packages
On a headless Raspberry Pi, you'll need to install python3 Pip before install of Metrics2MQTT:
sudo apt install python3-pip -y
Additionally, Metrics2MQTT installation requires sudo, and in versions from Debian Bookworm onwards, does not install. It needs a virtual environment such as 'venv' (best practice).
A workaround is to use '--break-system-packages':
sudo pip3 install metrics2mqtt --break-system-packages