# Problem with installing/using h5py with stack python libraries

**URL:** <https://www.rubin.community/t/problem-with-installing-using-h5py-with-stack-python-libraries/2079>\
**Category:** Data Management\
**Created:** [July 14, 2017, 4:31pm UTC](https://www.rubin.community/t/problem-with-installing-using-h5py-with-stack-python-libraries/2079 "2017-07-14T16:31:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nchotard](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@nchotard](https://www.rubin.community/u/nchotard)\
**Post date:** [July 14, 2017, 4:31pm UTC](https://www.rubin.community/t/problem-with-installing-using-h5py-with-stack-python-libraries/2079/1 "2017-07-14T16:31:19Z")

</div>

I’m having trouble installing/using the `h5py` ([http://www.h5py.org/](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.

```auto
>>> 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.

---

<div class="post-metadata">

**Author:** ![nchotard](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@nchotard](https://www.rubin.community/u/nchotard)\
**Post date:** [July 14, 2017, 5:43pm UTC](https://www.rubin.community/t/problem-with-installing-using-h5py-with-stack-python-libraries/2079/2 "2017-07-14T17:43:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jbosch](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jbosch/32/12_2.png) [@jbosch](https://www.rubin.community/u/jbosch)\
**Post date:** [July 14, 2017, 5:54pm UTC](https://www.rubin.community/t/problem-with-installing-using-h5py-with-stack-python-libraries/2079/3 "2017-07-14T17:54:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nchotard](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@nchotard](https://www.rubin.community/u/nchotard)\
**Post date:** [July 15, 2017, 12:50pm UTC](https://www.rubin.community/t/problem-with-installing-using-h5py-with-stack-python-libraries/2079/4 "2017-07-15T12:50:11Z")

</div>

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.
