在同一个Python进程中同时使用h5py和pytables

时间:2015-02-04 23:20:49

标签: python hdf5 pytables h5py

用于HDF5交互的两个主要Python库是h5pypytables。他们不能很好地在一起玩,特别是在窗户上

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

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

我需要在同一个应用程序中使用它们,但是在导入每个库时我无法从两个库中获得完整功能。有解决方案吗?

2 个答案:

答案 0 :(得分:3)

根据this thread on github不,我认为你不能。似乎h5py无法做任何事情,所以我会开始使用pytables github的问题。

另外,你可以使用两种不同的脚本吗?这样导入就不会出现问题。

答案 1 :(得分:0)

您使用conda安装软件包吗?如果是,则看起来像an issue reported on GitHub。对我来说,这个问题似乎是0版本2.4.0的版本h5py的问题。尝试降级到版本2.3.x。这对我来说很好。