I am using Mac OS X 10.9.5 with gcc version
4.2.1. I have installed the latest
version of HDF5 (1.8.13) and have verified that the C++ API works as
expected. The HDF5 version information, produced with the command ‘h5c++ -showconfig’, is as follows:
SUMMARY OF THE HDF5 CONFIGURATION
=================================
General Information:
-------------------
HDF5 Version: 1.8.13
Configured on: Tue Sep 30 17:08:10 CDT 2014
Configured by: ni...@XX-XX-XX-XX-XX-XX.wlan.lsu.edu
Configure mode: production
Host system: i386-apple-darwin13.4.0
Uname information: Darwin XX-XX-XX-XX-XX-XX.wlan.lsu.edu 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Byte sex: little-endian
Libraries: static, shared
Installation point: /usr/local/hdf5
Compiling Options:
------------------
Compilation Mode: production
C Compiler: /usr/bin/clang ( Apple LLVM version 5.0 )
CFLAGS:
H5_CFLAGS:
AM_CFLAGS:
CPPFLAGS:
H5_CPPFLAGS: -DNDEBUG -UH5_DEBUG_API
AM_CPPFLAGS:
Shared C Library: yes
Static C Library: yes
Statically Linked Executables: no
LDFLAGS:
H5_LDFLAGS:
AM_LDFLAGS:
Extra libraries: -lz -ldl -lm
Archiver: ar
Ranlib: ranlib
Debugged Packages:
API Tracing: no
Languages:
----------
Fortran: no
C++: yes
C++ Compiler: /usr/bin/clang++ ( Apple LLVM version 5.0 )
C++ Flags:
H5 C++ Flags:
AM C++ Flags:
Shared C++ Library: yes
Static C++ Library: yes
Features:
---------
Parallel HDF5: no
High Level library: yes
Threadsafety: no
Default API Mapping: v18
With Deprecated Public Symbols: yes
I/O filters (external): deflate(zlib)
I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
MPE: no
Direct VFD: no
dmalloc: no
Clear file buffers before write: yes
Using memory checker: no
Function Stack Tracing: no
Strict File Format Checks: no
Optimization Instrumentation: no
Large File Support (LFS): yes
I am using Python 2.7.6 :: Anaconda 1.9.0 (x86_64). I had previously installed numpy, but upgraded to the current version just to be sure. I first attempted to install h5py using the
anaconda ‘pip’ tool:
sudo pip install h5py
The installation completes successfully, but the test program does not. When I try to import the module within ipython, I get the following error message
In [1]: import h5py
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-e81388eeaef8> in <module>()
----> 1 import h5py
//anaconda/lib/python2.7/site-packages/h5py/__init__.py in <module>()
8 # and contributor agreement.
9
---> 10 from h5py import _errors
11 _errors.silence_errors()
12
ImportError: dlopen(//anaconda/lib/python2.7/site-packages/h5py/_errors.so, 2): Library not loaded: libhdf5.7.dylib
Referenced from: //anaconda/lib/python2.7/site-packages/h5py/_errors.so
Reason: image not found
This is indicating that the distribution is looking for the dynamic library file libhdf5.7.dylib, but cannot find it. The library files for HDF5 on Unix-like systems are typically installed at /usr/local/hdf5/lib/. In that directory on my system, there is a similar library, libhdf5.8.dylib present. I attempted a symbolic link that would redirect the application to use the libhdf5.8.dylib library, but ipython then outputs a version mismatch error:
In [1]: import h5py
Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.8.9, library is 1.8.13
The last line clarifies the relevant version numbers. Since I have written and tested code using the latest HDF5 version, I do not want to roll back to a previous version if possible. I have attempted to force the correct version number when installing the module
export HDF5_VERSION=1.8.13
sudo pip install h5py
This installation succeeded as before, but yielded the same error when trying to import in ipython. I also tried building h5py from source instead of using pip. The source package was downloaded and unpacked. I tried both the automatic HDF5 version detection
python setup.py install
and specifying the HDF5 version
python setup.py install –-hdf5-version=1.8.13
These both built successfully, but encountered the same problem when importing again. This is confusing, as the version of h5py downloaded by myself and by pip is reported to be compatible with this version of HDF5.
I uninstalled h5py and deleted my unpacked source folder, then re-unpacked the tar. I then ran the following:
python setup.py build –hdf5-version=1.8.13
python setup.py check
sudo python setup.py install –hdf5-version=1.8.13
This should specify the version to build the module against, but the problem persists. I have also tried specifying the HDF5 install location with the -hdf5 flag. I haven't been able to find a solution to this problem just browsing around, so I would appreciate any help that you could give!
Thanks,
Nick Cannady
--
You received this message because you are subscribed to a topic in the Google Groups "h5py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h5py/Sj_4bIUamYQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h5py+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "h5py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h5py/Sj_4bIUamYQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h5py+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.