Fix Python HDF5 library version mismatched error

To fix the issue when using pandas HDFStore class, upon creating an HDFStore object:

x = HDFStore(‘test.h5’) Warning! HDF5 library version mismatched error

or if you get a similar error upon import h5py, then apply the following upgrade(s)

Windows/Mac/Linux/WSL (NOT Cygwin)

conda install --upgrade pandas pytables h5py

or if not using Anaconda Python:

pip install --upgrade pandas tables h5py

Cygwin only

We assume you have installed Pip in Cygwin.

  1. install python3-devel
    setup-x86_64 -P python3-devel gcc
    
  2. Start Cygwin with Run As Administrator.
    /usr/bin/pip3 install --upgrade h5py
    

This will take several minutes, as often Numpy will be upgraded as well.

Leave a Comment