Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use both h5py and pytables in the same Python process

The two main Python libraries for HDF5 interaction are h5py and pytables. They don't play nicely together, particularly on windows

>>> import tables
>>> import h5py
ImportError: DLL load failed

>>> import h5py
>>> import tables   # works fine

I need to use both in the same application but I'm unable to get full functionality from both libraries when each is imported. Is there a solution to this?

like image 399
MRocklin Avatar asked Jul 16 '26 08:07

MRocklin


1 Answers

According to this thread on github no, I don't think you can. It seems that h5py cannot do anything about it, so I would start an issue with the pytables github.

Also, could you possibly use two different scripts? That way the import wouldn't bork.

like image 181
IronManMark20 Avatar answered Jul 17 '26 22:07

IronManMark20