dbus not available in Balena Python container

I’m using balenalib/%%RESIN_MACHINE_NAME%%-debian-python on a Balena Orange pi Zero image. The docs suggest the python-dbus module is already installed (https://www.balena.io/docs/reference/OS/network/2.x/#changing-the-network-at-runtime), yet in the container being pulled it doesn’t appear to be.

Ultimately I was trying to pip install dbus-python but even with python-dbus it generates an error. Turns out libdbus-glib-1-dev and libgirepository1.0-dev are missing from the container and need installing first (https://stackoverflow.com/questions/61285415/no-package-dbus-1-found).

install_packages libdbus-glib-1-dev libgirepository1.0-dev

Then pip install dbus-python will work

Mostly here for info, and for docs to either be updated, or the dbus-python to be added to the python images, assuming I have understood the docs correctly.

Hi there – thanks very much for letting us know about this. We’ve checked with our OS team, and you’re correct: dbus-python is only installed in the build variants of our images. We’ve filed an issue to get this resolved.

Thanks again for taking the time to let us know!

All the best,
Hugh