satnogs_client: Installation of h5py broken on Debian 11
On Debian & Raspbian 11/bullseye, the installation of h5py
inside the virtual environment is broken:
Jul 31 09:57:23 raspberrypi systemd[1]: Started SatNOGS client.
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: Traceback (most recent call last):
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "/var/lib/satnogs/bin/satnogs-client", line 5, in <module>
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: from satnogsclient import main
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "/var/lib/satnogs/lib/python3.9/site-packages/satnogsclient/__init__.py", line 13, in <module>
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: from satnogsclient.scheduler.tasks import status_listener
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "/var/lib/satnogs/lib/python3.9/site-packages/satnogsclient/scheduler/tasks.py", line 16, in <module>
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: from satnogsclient.observer.observer import Observer
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "/var/lib/satnogs/lib/python3.9/site-packages/satnogsclient/observer/observer.py", line 19, in <module>
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: from satnogsclient.artifacts import Artifacts
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "/var/lib/satnogs/lib/python3.9/site-packages/satnogsclient/artifacts.py", line 5, in <module>
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: import h5py
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "/var/lib/satnogs/lib/python3.9/site-packages/h5py/__init__.py", line 46, in <module>
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: from ._conv import register_converters as _register_converters
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "h5py/_conv.pyx", line 1, in init h5py._conv
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: File "h5py/h5t.pyx", line 1, in init h5py.h5t
Jul 31 09:57:25 raspberrypi satnogs-client[7774]: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 44 from C header, got 40 from PyObject
⤳ Possible workaround
Install h5py via system-site-packages using the debian package python3-h5py
and do not install h5py
inside the virtual environment. One disadvantage of this method is it's additional requirement that h5py
is not installed inside the virtenv.
rm -rf /var/lib/satnogs/lib/python3.9/site-packages/h5py /var/lib/satnogs/lib/python3.9/site-packages/h5py-2.10.0.dist-info
apt-get install python3-h5py
Update h5py
inside the virtual environment to an installable version. This can only happen while updating all dependencies of satnogs-client though.
Edited by Fabian P. Schmidt