在IPython中的Ubuntu 13.04中导入PyTables时出现以下错误:
In [1]: from tables import *
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-4c3ea368be2a> in <module>()
----> 1 from tables import *
/usr/local/lib/python2.7/dist-packages/tables/__init__.py in <module>()
80
81 # Necessary imports to get versions stored on the cython extension
---> 82 from tables.utilsextension import (get_pytables_version, get_hdf5_version,
83 getPyTablesVersion, getHDF5Version) # Pending Deprecation!
84
ImportError: libhdf5.so.8: cannot open shared object file: No such file or directory
我已经采取了以下措施:
>正确设置LD_LIBRARY_PATH和PATH环境变量,并通过回显它们的值来验证它们是否指向正确的路径.
>确保文件libhdf5.so.8在路径中可用
>开始一个新的终端
>在终端中,我执行了/ etc / environment源代码,并在这些文件中设置了变量.
>用ipython命令启动ipython控制台
感谢您的帮助.
解决方法:
您的问题是pytables包是针对libhdf5.so.8编译的,当前在ubuntu存储库中您只有libhdf5-7 :(而且,updates