Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

h5py setup.py on Mac: hdf5.h file not found

Tags:

macos

gcc

hdf5

h5py

I am building h5py on Mac, following instructions "Building against Parallel HDF5" in this link: http://docs.h5py.org/en/latest/build.html

$ export CC=mpicc
$ python setup.py configure --mpi
$ sudo python setup.py build

I get this error:

h5py-2.5.0/h5py/api_compat.h:27:10: fatal error: 'hdf5.h' file not found

What should I do? If I need to install some dev version of HDF5, how can I do it on Mac?

like image 270
yanggao Avatar asked Jun 15 '15 05:06

yanggao


1 Answers

I was getting this same error message yesterday, doing a general installation of HDF5 (not building against parallel). I was able to get around it by using Homebrew (a package manager for OS X that can be found here: http://brew.sh/).

Once you've installed Homebrew (if you don't already have it), the command is brew install hdf5.

like image 99
Katie Rose Avatar answered Sep 20 '22 17:09

Katie Rose