pip3 install h5py is not working in mac OS
based off the docs do a brew install like this.
$ brew install hdf5
Then install h5py preferably using conda
$ conda install h5py
or, with pip
$ pip3 install h5py
Without specifying the hdf5's version, you can install h5py like below.
brew install hdf5
export HDF5_DIR=$(brew --prefix hdf5)
pip install h5py