Uninstalling and re-installing the h5py resolved the issue:
sudo pip3 uninstall h5py
pip3 install --no-binary=h5py h5py --user
Thanks for the sample code you proposed. Now it works fine.
Uninstalling and re-installing the h5py resolved the issue:
sudo pip3 uninstall h5py
pip3 install --no-binary=h5py h5py --user
Thanks for the sample code you proposed. Now it works fine.