使用pyCGNS时ImportError

时间:2019-01-24 10:44:06

标签: python hdf5 cgns

我最近按照指南中的建议重新安装了hdf5

$ ./configure --prefix=/usr/local/hdf5 --libdir=/usr/local/hdf5/lib --bindir=/usr/local/hdf5/bin --enable-shared --with-pic
$ make
$ make install

之后,我还安装了pyCGNS,并适当地编辑setup_userConfig.py并包括所有hdf5依赖项:

HDF5_PATH_INCLUDES = ['/usr/local/hdf5/include']
HDF5_PATH_LIBRARIES = ['/usr/local/hdf5/lib']
HDF5_LINK_LIBRARIES = ['hdf5']

当我在Python脚本中import CGNS.MAP时仍然出现以下错误:

File "./Test.py", line 4, in <module>
    import CGNS.MAP
  File "/usr/local/lib/python2.7/dist-packages/pyCGNS-5.0.625-py2.7-linux-x86_64.egg/CGNS/MAP/__init__.py", line 59, in <module>
    from .EmbeddedCHLone import load, save, probe
ImportError: libhdf5.so.103: cannot open shared object file: No such file or directory

libhdf5.so.103位于/usr/local/hdf5/lib安装期间指定的文件夹pyCGNS中。

我在做什么错? 先谢谢您的帮助!

0 个答案:

没有答案