Search code examples
pythonpiphdf5pytablesconda

How to install PyTables 2.3.1 with Anaconda, missing HDF5 library


I need to run an older verion of PyTables, that is 2.3.1, in and Anaconda environment on Linux. But I cannot install it.

conda install -n myenv pytables=2.3.1

fails finding the appropriate version.

conda install -n myenv pytables=2

installs PyTables 2.4.0 successfully. But I need 2.3.1.

Also activating the environment and installing via pip does not work.

pip install tables==2.3.1

fails with the following error:

.. 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.

Where can I find the HDF5 installation of Anaconda? And how do I pass the --hdf5 option to pip? I already tried

pip install tables==2.3.1 --install-option="--hdf5=/home/me/Programme/anaconda"

But it also fails with the same error as above.


Solution

  • You can try

    env HDF5_DIR="/home/me/Programme/anaconda" pip install tables==2.3.1
    

    It worked for me.