Downloads for all platforms are available at http://h5py.googlecode.com. Tar files are available for UNIX-like systems (Linux and Mac OS-X), and a binary installer for Windows which includes HDF5 1.8. You can also install h5py via easy_install on UNIX, and via MacPorts.
On Windows, HDF5 is provided as part of the integrated installer for h5py.
On Linux and OS-X, you must provide HDF5 yourself. HDF5 versions 1.8.3 and higher are supported. The best solution is to install HDF5 via a package manager like apt, yum or fink. Regardless of how you decide to install HDF5, keep the following in mind:
The HDF Group downloads are located at http://www.hdfgroup.com/HDF5 .
Download the executable installer from Google Code and run it. This installs h5py and a private copy of HDF5 1.8.
This package is designed to be installed from source. You will need Python and a C compiler. Setuptools and Cython are not required.
H5py can now be automatically installed, for example with setuptools’ easy_install command. You don’t need to download anything; just run the command:
$ [sudo] easy_install h5py
Alternatively, you can install in the traditional manner by downloading the most recent tarball of h5py, uncompressing it, and running setup.py:
$ python setup.py build
$ [sudo] python setup.py install
Sometimes h5py may not be able to determine what version of HDF5 is installed. Also, sometimes HDF5 may be installed in an unusual location. When using setup.py directly, you can specify the location of the HDF5 library:
$ python setup.py build –hdf5=/path/to/hdf5 $ [sudo] python setup.py install
The HDF5 directory you specify should contain sub-directories like “include”, “lib” and “bin”.
Alternatively (for example, if installing with easy_install), you can use environment variables:
$ export HDF5_DIR=/path/to/hdf5
$ easy_install h5py
Keep in mind that on some platforms, sudo will filter out your environment variables. If you need to be a superuser to run easy_install, you might want to issue all three of these commands in a root shell.
Running unit tests can help both you and the entire h5py community. If you’re installing from a tarball we strongly recommend running the test suite first:
$ python setup.py test
Please report any failing tests to the mailing list (h5py at googlegroups.com), or file a bug report at http://h5py.googlecode.com.