# OSError when \`import openmc.lib\` or \`import openmc.deplete\`

**URL:** <https://openmc.discourse.group/t/oserror-when-import-openmc-lib-or-import-openmc-deplete/529>\
**Category:** User Support\
**Created:** [December 24, 2019, 3:24pm UTC](https://openmc.discourse.group/t/oserror-when-import-openmc-lib-or-import-openmc-deplete/529 "2019-12-24T15:24:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimin\_ma](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jimin\_ma](https://openmc.discourse.group/u/jimin_ma)\
**Post date:** [December 24, 2019, 3:24pm UTC](https://openmc.discourse.group/t/oserror-when-import-openmc-lib-or-import-openmc-deplete/529/1 "2019-12-24T15:24:19Z")

</div>

I have installed openMC on Ubuntu16lts-x86\_64 system by cmake after I installed mpich, libmpich-dev, openmpi, libopenmpi-dev, libhdf5-dev and hdf5. The python API has been installed by `python3 steup.py install`. Everything seems fine when I tested examples.  
However, when I tested `import openmc.lib` or `import openmc.deplete`, error happened as following:

_import openmc.lib_

_\>\>\>_

---

<div class="post-metadata">

**Author:** ![Andrew\_Johnson](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Andrew\_Johnson](https://openmc.discourse.group/u/Andrew_Johnson)\
**Post date:** [January 4, 2020, 5:20pm UTC](https://openmc.discourse.group/t/oserror-when-import-openmc-lib-or-import-openmc-deplete/529/2 "2020-01-04T17:20:06Z")

</div>

Ma,

Interesting. Can you provide more information on your build steps? How did you install the dependencies, specifically HDF5? It looks like OpenMC isn’t linked against your HDF5 library. What command did you use to build OpenMC?

Thanks,

Andrew

---

<div class="post-metadata">

**Author:** ![jimin\_ma](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jimin\_ma](https://openmc.discourse.group/u/jimin_ma)\
**Post date:** [January 8, 2020, 3:14pm UTC](https://openmc.discourse.group/t/oserror-when-import-openmc-lib-or-import-openmc-deplete/529/3 "2020-01-08T15:14:24Z")

</div>

Andrew,

Thanks for your attention. The problem has been solved. There were several ‘libhdf5.so’ on the location of PATH in my system. When I installed OpenMC by source, it caused chaos. After I specified only one right `libhdf5.so` file, the compilation was right.

Thanks!

Ma

在 2020年1月5日星期日 UTC+8上午1:20:06，Andrew Johnson写道：
