6

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

2 Answers 2

10

Check that you are not inside the h5py installation directory.

2
  • Also, try opening up a new terminal. In linux (which, like OS X, is Unix-like), you can't usually install a python package and then test it in the same terminal.
    – apdnu
    Commented May 17, 2013 at 20:16
  • Does anyone know why this matters?
    – tel
    Commented Dec 2, 2014 at 4:19
0

My advice, if you can, install h5py using Anaconda Distribution Open Data Science Core.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.