Reputation: 251
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?
Upvotes: 16
Views: 10995
Reputation: 438
You can find hdf5.h lib in your Unix and set in CPATH varible
freebsd 11 example:
>> find /usr -iname "*hdf5.h*"
<< /usr/local/include/hdf5.h
>> export CPATH="/usr/local/include/"
Then you can compile that you need
Upvotes: 3
Reputation: 221
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
.
Upvotes: 22