Install h5py on Ubuntu 12.04

I used the following commands:

$ wget http://h5py.googlecode.com/files/h5py-2.2.0.tar.gz
$ tar -xzf h5py-2.2.0.tar.gz
$ cd h5py-2.2.0
$ export C_INCLUDE_PATH=/usr/lib/openmpi/include

If you don’t issue the last command, you will see errors like “mpi.h” cannot be found

$ python setup.py build
$ python setup.py test
$ sudo python setup.py install

By now, you have h5py installed. Try this example: https://github.com/h5py/h5py/blob/2.1/examples/multiprocessing_example.py, and observe a beautiful picture generated using all processors on your computer.

mandelbrot

mandelbrot

One thought on “Install h5py on Ubuntu 12.04

Leave a Reply

Your email address will not be published. Required fields are marked *