Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing h5py on OS X

I've spent the day trying to get the h5py module of python working, but without success. I've installed HDF5 shared libraries, followed the instructions I could find on the web to get it right. But it doesn't work, below is the error message I get when trying to import the module into python. I tried installing through MacPorts too but again it wouldnt work.

I'm using Python27 32 bits (had too for another module, and thus installed the i386 HDF5 library... if that's right?)

Any help very welcome !

Thank you !

import h5py

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h5py/__init__.py", line 1, in <module>

      from h5py import _errors

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h5py/_errors.so, 2): Symbol not found: _H5E_ALREADYEXISTS_g

  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h5py/_errors.so

  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h5py/_errors.so
like image 475
Yan Avatar asked Aug 08 '11 20:08

Yan


People also ask

What is h5py package?

The h5py package provides both a high- and low-level interface to the HDF5 library from Python. The low-level interface is intended to be a complete wrapping of the HDF5 API, while the high-level component supports access to HDF5 files, datasets and groups using established Python and NumPy concepts.

How install HDF5 on Windows?

Windows Note: The HDF Group uses an installer program to install the HDF5 libraries, header and support files on Windows. This installer is digitally signed by The HDF Group. Please be aware that the installer requires that the user have permission to install files on the target computer.


1 Answers

Check that you are not inside the h5py installation directory.

like image 78
fheshwfq Avatar answered Oct 21 '22 10:10

fheshwfq