Here are the steps to install h5py on MacOS with an M1 chip:
Open the Terminal application on your MacOS.
Type the following command and press enter to install "homebrew", a popular package manager for MacOS:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once the installation is complete, type the following command and press enter to update brew:
brew update
Next, type the following command and press enter to install HDF5:
brew install hdf5
Once HDF5 is installed, type the following command and press enter to install h5py:
pip install h5py
Verify that h5py is installed properly by typing the following command and pressing enter:
python -c "import h5py; print(h5py.__version__)"
This should print the version number of h5py installed on your computer.
That's it! h5py is now installed and ready to be used with Keras.
Asked: 2021-12-16 11:00:00 +0000
Seen: 9 times
Last updated: Jan 04 '22