7

I am installing Python 2.7 in addition to 2.7. When installing PyTables again for 2.7, I get this error -

  • Found numpy 1.5.1 package installed. .. ERROR:: Could not find a local HDF5 installation. You may need to explicitly state where your local HDF5 headers and library can be found by setting the HDF5_DIR environment variable or by using the --hdf5 command-line option.

I am not clear on the HDF installation. I downloaded again - and copied it into a /usr/local/hdf5 directory. And tried to set the environement vars as suggested in the PyTable install. Has anyone else had this problem that could help?

skaffman
  • 398,947
  • 96
  • 818
  • 769
tnt
  • 3,411
  • 5
  • 24
  • 23

5 Answers5

4

My HDF5 was installed with homebrew, so setting the environment variable as follows worked for me: HDF5_DIR=/usr/local/Cellar/hdf5/1.8.9

senia
  • 37,745
  • 4
  • 88
  • 129
Alex Benke
  • 153
  • 1
  • 8
  • Thanks, I did the homebrew install with: `brew tap homebrew/science` along with a `brew install hdf5`, then it worked. – Will Jan 18 '15 at 15:26
4

The hdf5 command line option was not stated correctly ( --hdf5='/usr/local/hdf5' ). Sprinkling print statements in the setup.py made it easier to pin down the problem.

tnt
  • 3,411
  • 5
  • 24
  • 23
3

That did not work for me.

On Ubuntu 13.10 -- after downloading the latest hdf5 and the python handles for it I sudo'd to create a symbolic link for the header files for hdf5 when the dependent libraries I was using failed to find them -- I'm working with pac bio core libraries for a custom though using

sudo updatedb

and

locate hdf5

did find them in my path after I had downloaded and installed the core libraries and python handles

wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.12.tar.gz

and

wget https://pypi.python.org/packages/source/h/h5py/h5py-2.2.1.tar.gz

I had to do the following:

export HDF5_DIR=/mnt/hdf5-1.8.12/hdf5/

pip install tables --force
eebbesen
  • 5,070
  • 8
  • 48
  • 70
adeslat
  • 31
  • 2
2

I had to install libhdf5-8 and libhdf5-serial-dev first.

Then, for me, the command on Ubuntu was:

export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/

Def_Os
  • 5,301
  • 5
  • 34
  • 63
2

Do the following steps:

  1. brew tap homebrew/science
  2. brew install hdf5
  3. see where hdf5 is installed, it shows at the end of second step
  4. export HDF5_DIR=/usr/local/Cellar/hdf5/1.8.16_1/ (Depending on the location that is installed on your computer)
  5. This one worked for me on MAC :-)
Rouzbeh
  • 2,141
  • 1
  • 11
  • 19