在Ubuntu 13.04中,在IPython中导入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在路径中可用
- 启动了一个新终端
- 在终端中执行了source /etc/environment命令,并在这些文件中设置了变量。
- 运行ipython命令以启动ipython控制台