Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are the steps to install h5py on MacOS with an M1 chip:

  1. Open the Terminal application on your MacOS.

  2. 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)"
    
  3. Once the installation is complete, type the following command and press enter to update brew:

    brew update
    
  4. Next, type the following command and press enter to install HDF5:

    brew install hdf5
    
  5. Once HDF5 is installed, type the following command and press enter to install h5py:

    pip install h5py
    
  6. 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.