Warning! ***HDF5 library version mismatched error*** python pandas windows

前端 未结 8 1464
情深已故
情深已故 2020-12-30 07:55

I\'m using pandas/python to save a DataFrame in a HDFStore format. When I apply the my_data_frame.to_hdf(arguments...) command I have an error message:Warni

相关标签:
8条回答
  • 2020-12-30 08:08

    My case was trivial and did not need any installations: I had started spyder and an IPython console from a conda environment using cmd:

    activate env
    spyder
    

    I then upgraded hdf5 for the env in cmd using conda. However, after running my code in the same IPython console, I got a similar error message. All it took was to restart spyder and the corresponding IPython console. I suppose this reloads the packages consistently.

    0 讨论(0)
  • 2020-12-30 08:10

    also you can force to install custom package version:

    conda install --force-reinstall anaconda hdf5==1.8.15
    

    or

    conda install -c conda-forge hdf5=1.8.15
    
    0 讨论(0)
  • 2020-12-30 08:11

    This fixed it for me, hope it helps.

    Step one

    pip uninstall h5py

    Step two

    pip install h5py

    0 讨论(0)
  • 2020-12-30 08:11

    For some reason uninstalling with conda and then installing hdf5 again with conda is not working. However, if you use pip to uninstall and then conda to install hdf5, it's working.

    So try:

    pip uninstall hdf5
    conda install hdf5
    
    0 讨论(0)
  • 2020-12-30 08:13

    The only procedure that worked for me on macOS was to create a virtualenv:

    virtualenv -p python3 myenv
    . myenv/bin/activate
    pip3 install h5py==1.10.4 # or whichever version you want
    

    Absolutely nothing else worked!

    You may need a brew install hdf5

    github issue that did not help:

    https://github.com/h5py/h5py/issues/1068

    0 讨论(0)
  • 2020-12-30 08:25

    I tried every method here but something else worked. So I thought of sharing it.

    conda install -c conda-forge hdf5=1.10.5 #newer system's problem
    conda install -c conda-forge hdf5=1.8.18 #for this particular problem
    

    It will forcefully install, either upgrading or downgrading, your hdf5. When u juggle it uninstall keras with it and when u install keras it upgrades the hdf5. So forge alter it to make it work.

    0 讨论(0)
提交回复
热议问题