Raspberry Pi 4 Installation HELP


Couldn’t install h5py using pip (or during TensorFlow installation) on Raspberry Pi 4 Model B Rev 1.5 under Debian GNU/Linux 12 (bookworm) aarch64 at Kernel: 6.6.31+rpt-rpi-v8. The error message for the pip installation is:

      Loading library to get build settings and version: libhdf5.so
      error: Unable to load dependency HDF5, make sure HDF5 is installed properly
      Library dirs checked: []
      error: libhdf5.so: cannot open shared object file: No such file or directory
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for h5py
Failed to build h5py
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (h5py)

Is there a workaround, please? Thanks.


Apologies if this section of the forum is not the right place but none of the other sections seemed more appropriate. I’m trying to install TensorFlow on arm64/aarch64 but used to be successful several years ago. I’m not sure that I need h5py at all but it is tough getting help from Google on tweaking the TensorFlow installation.

You did not provide enough information but I think your problem is related to this h5py issue: Arm wheels missing from latest release · Issue #2408 · h5py/h5py · GitHub.

Are you familiar with the conda or mamba package managers? They have h5py package for arm64. After this, you should be able to proceed with installing TensorFlow.