ImportError:... / python2.7 / site-packages / Scientific / _netcdf.so:未定义的符号:H5P_CLS_FILE_CREATE_g

时间:2015-10-23 01:40:02

标签: python hdf5 netcdf scientific-computing

我在超级计算机中心的分配系统中安装了NetCDF,但是当我运行python文件时,它显示: ImportError:/public/home/geosign/opt/lib/python2.7/site-packages/Scientific/_netcdf.so:undefined symbol:H5P_CLS_FILE_CREATE_g

导入错误:

    Traceback (most recent call last):
File "opt4.py", line 12, in <module>
    from ase.calculators.jacapo import Jacapo
  File "/public/home/geosign/opt/lib/python2.7/site-packages/ase/calculators/jacapo/__init__.py", line 3, in <module>
    from ase.calculators.jacapo.jacapo import *
  File "/public/home/geosign/opt/lib/python2.7/site-packages/ase/calculators/jacapo/jacapo.py", line 21, in <module>
    from Scientific.IO.NetCDF import NetCDFFile as netCDF
  File "/public/home/geosign/opt/lib/python2.7/site-packages/Scientific/IO/NetCDF.py", line 168, in <module>
    from Scientific._netcdf import *
ImportError: /public/home/geosign/opt/lib/python2.7/site-packages/Scientific/_netcdf.so: undefined symbol: H5P_CLS_FILE_CREATE_g

似乎_netcdf.so无法找到HDF5的lib文件(?)如果我在没有安装zlib,HDF5或NETCDF的情况下运行作业,我会收到相同的错误消息。但是,当我安装这些软件时,没有安装错误。所有软件都配置了“--enable-share”,并考虑了LD_LIRBARARY_PATH。

当我检查_netcdf.so的ldd时,它显示: (似乎找不到hdf5的lib文件)

linux-vdso.so.1 =>  (0x00007fff305fd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ad6970d5000)
libc.so.6 => /lib64/libc.so.6 (0x00002ad6972f1000)
/lib64/ld-linux-x86-64.so.2 (0x0000003fd0000000)

只有一件事被怀疑...... HDF5可能没有被成功编译,因为在安装它时有数百个类似的警告(但是,因为我的专业不是CS,我无法完全理解它。)

H5dbg.lo
H5dbg.c: In function 'H5_buffer_dump':
H5dbg.c:111: warning: will never be executed
H5dbg.c:113: warning: will never be executed
H5dbg.c:120: warning: will never be executed
H5dbg.c:108: warning: will never be executed
H5dbg.c:110: warning: will never be executed
H5dbg.c:118: warning: will never be executed
H5dbg.c:119: warning: will never be executed
H5dbg.c:109: warning: will never be executed

我如何配置hdf5:

./configure --prefix=/public/home/geosign/usr --enable-hl --enable-shared --with-zlib=/public/home/geosign/usr  --enable-threadsafe --with-pthread=/usr

我如何配置netcdf:

 CPPFLAGS=-I/public/home/geosign/usr/include LDFLAGS=-L/public/home/geosign/usr/lib ./configure --prefix=/public/home/geosign/usr --enable-netcdf-4 --enable-shared

    # NetCDF C Configuration Summary
==============================

# General
-------
NetCDF Version:     4.3.3.1
Configured On:      Thu Oct 22 14:48:45 CST 2015
Host System:        x86_64-unknown-linux-gnu
Build Directory:    /public/home/geosign/software/netcdf-4.3.3.1
Install Prefix:         /public/home/geosign/usr

# Compiling Options
-----------------
C Compiler:     /usr/bin/gcc
CFLAGS:         -g -O2
CPPFLAGS:       -I/public/home/geosign/usr/include
LDFLAGS:        -L/public/home/geosign/usr/lib
AM_CFLAGS:      
AM_CPPFLAGS:        
AM_LDFLAGS:     
Shared Library:     yes
Static Library:     yes
Extra libraries:    -lhdf5_hl -lhdf5 -ldl -lm -lz 

# Features
--------
NetCDF-2 API:       yes
NetCDF-4 API:       yes
HDF4 Support:       no
HDF5 Support:       yes
PNetCDF Support:    no
Parallel Support:   no
DAP Support:        no
Diskless Support:   yes
MMap Support:       no
JNA Support:        no

非常感谢!我已经工作了好几天了......太伤心了。 :其中

0 个答案:

没有答案
相关问题