Problem with installing/using h5py with stack python libraries

I’m having trouble installing/using the h5py (http://www.h5py.org/) library while using the stack miniconda environment. Installing this library in my home directory using pip (the stack one), I get the following error during the import.

>>> import h5py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/afs/in2p3.fr/home/n/nchotard/.local/lib/python2.7/site-packages/h5py/__init__.py", line 24, in <module>
    from . import _errors
ImportError: /afs/in2p3.fr/home/n/nchotard/.local/lib/python2.7/site-packages/h5py/_errors.so: undefined symbol: PyUnicodeUCS2_FromUnicode
>>> 

Does anyone know how to fix that? The alternative solution I was thinking about was to have this library included in the miniconda install of the stack, which would actually be an easier way to fix that and make sure that there won’t be such problem in the later weeklies, that I’m using every week.

I actually had numpy installed in my home directory, which apparently wasn’t compatible with the version of h5py I installed. Uninstalling these two libraries, and re-installing h5py with the miniconda pip worked.

Would it possible to install that library in the stack anyway?

I don’t think it makes sense to install with the stack if the rest of the stack doesn’t use it. But it does sound like it’d be good to install via conda, which I’d think you could do yourself if there is a conda package available for it.

Ok, I see. I actually agree that it only makes sense to install it with the stack if it’s used by the stack. I will do that myself now that I understood my problem.