Installation Error "hdf5.h: No such file or directory"

1,522 views
Skip to first unread message

Derek Eidum

unread,
Jun 5, 2015, 2:51:22 PM6/5/15
to h5...@googlegroups.com
I've tried installing using pip and using the tarball, and both times I got the same error: "hdf5.h: No such file or directory."  The full log is included as an attachment.  Any idea what's causing this?
h5pylog.txt

Andrew Collette

unread,
Jun 8, 2015, 11:40:42 AM6/8/15
to h5...@googlegroups.com
Hi Derek,

> the same error: "hdf5.h: No such file or directory." The full log is

You will need to first install the HDF5 library using your platform's
package manager (libhdf5-dev or similar).

Andrew

Laszlo

unread,
Jun 8, 2015, 6:23:13 PM6/8/15
to h5...@googlegroups.com
Hi Andrew,
I am getting a similar error when trying to build on Windows. I read a post of yours on a different forum, where you suggested that on windows users should just use the installers. However, the installers are only available as 32-bit. My pyhton installation is 64-bit, and I am hoping to keep it that way. The 32-bit h5py installer for python 3.4 didn't recognize my 64-bit python 3.4 installation, which makes sense I suppose. 
I built HDF5 using the Cmake build instructions. Do you have any pointers on what to do next?
Laszlo

Andrew Collette

unread,
Jun 8, 2015, 8:21:35 PM6/8/15
to h5...@googlegroups.com
Hi,

> I am getting a similar error when trying to build on Windows. I read a post
> of yours on a different forum, where you suggested that on windows users
> should just use the installers. However, the installers are only available
> as 32-bit. My pyhton installation is 64-bit, and I am hoping to keep it that
> way. The 32-bit h5py installer for python 3.4 didn't recognize my 64-bit
> python 3.4 installation, which makes sense I suppose.
> I built HDF5 using the Cmake build instructions. Do you have any pointers on
> what to do next?

Building from source on Windows is not recommended. I would suggest
using a pre-made installer from here:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

or using Anaconda/Miniconda.

Andrew

Laszlo

unread,
Jun 8, 2015, 10:07:11 PM6/8/15
to h5...@googlegroups.com
Thanks for the link to that repository. It seems like a great resource! I downloaded the whl for 64-bit python 3.4. Unfortunately pip failed with some errors. I believe it is because of my python installation. 
I used VC 12.0 (Visual Studio 2013 Express) to build python 3.4 from source. I wished there was a way around it so that I didn't have to, but I don't think I can avoid it. I built all the other packages that I needed, including numpy, etc..  using VC 12.0, but I haven't been able to include h5py yet. Are you aware of a pre-built h5py package that was built using VC12.0? Alternatively -- and I know it is not recommended -- how would I go about building from source? I saw some readme notes in the windows subfolder of the h5py package that suggest using paver, but I haven't been able to figure out how to run that command. I imagine I will need to add some modifications to build for VC 12.0. 

Laszlo

Andrew Collette

unread,
Jun 9, 2015, 1:04:59 PM6/9/15
to h5...@googlegroups.com
Hi Laszlo,

> VC12.0? Alternatively -- and I know it is not recommended -- how would I go
> about building from source? I saw some readme notes in the windows subfolder
> of the h5py package that suggest using paver, but I haven't been able to
> figure out how to run that command. I imagine I will need to add some
> modifications to build for VC 12.0.

I'm reluctant to give an answer (apart from "it's not recommended" :))
because the process is very fragile, and the build scripts are written
for VS 2008 and 2010 only.

If you want to try yourself, there are basically two steps: (1) build
HDF5 with all the proper options, using the pavement.py file in the
"windows" directory, and then (2) build h5py, using the --hdf5 and
--hdf5-version options to tell h5py where the built copy of HDF5 is.
You would need to tweak pavement.py to know about VS 2013.

Btw the Paver project is here:

http://paver.github.io/paver/

Andrew

Laszlo

unread,
Jun 9, 2015, 1:19:34 PM6/9/15
to h5...@googlegroups.com
I will look into it. Thank you for the tips! 
Laszlo
Reply all
Reply to author
Forward
0 new messages