# Python API with depletion library

**URL:** <https://openmc.discourse.group/t/python-api-with-depletion-library/2166>\
**Category:** User Support\
**Created:** [July 5, 2022, 9:23pm UTC](https://openmc.discourse.group/t/python-api-with-depletion-library/2166 "2022-07-05T21:23:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inhyung](https://avatars.discourse-cdn.com/v4/letter/i/97f17d/32.png) [@Inhyung](https://openmc.discourse.group/u/Inhyung)\
**Post date:** [July 5, 2022, 9:23pm UTC](https://openmc.discourse.group/t/python-api-with-depletion-library/2166/1 "2022-07-05T21:23:17Z")

</div>

I tried to carry out a depletion calculation, but I got an error related with a python API I guess such as

> Traceback (most recent call last):  
> File “/global/home/users/inhyungkim/OPENMC/01\_FA\_PWR/02\_burnup\_single\_mat/depletion.py”, line 4, in   
> import openmc.deplete  
> File “/global/home/users/inhyungkim/.local/lib/python3.9/site-packages/openmc/deplete/ **init**.py”, line 10, in   
> from .operator import \*  
> File “/global/home/users/inhyungkim/.local/lib/python3.9/site-packages/openmc/deplete/operator.py”, line 22, in   
> import openmc.lib  
> File “/global/home/users/inhyungkim/.local/lib/python3.9/site-packages/openmc/lib/ **init**.py”, line 32, in   
> \_dll = CDLL(\_filename)  
> File “/global/software/sl-7.x86\_64/modules/langs/python/3.9/lib/python3.9/ctypes/ **init**.py”, line 382, in **init**  
> self.\_handle = \_dlopen(self.\_name, mode)  
> OSError: /global/software/sl-7.x86\_64/modules/langs/python/3.9/lib/python3.9/site-packages/numexpr/…/…/…/libstdc++.so.6: version `GLIBCXX\_3.4.29’ not found (required by /global/home/users/inhyungkim/.local/lib/python3.9/site-packages/openmc/lib/libopenmc.so)

**Some details**

- OpenMC version 0.13
- Built from the source
- python version 3.9
- installed the python API in my local directory
- ~/.local/lib/python3.9

* * *

- Working well without `openmc.deplete`, i.e. `import openmc`
- Only problem when `import openmc.deplete`

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [August 5, 2022, 3:11am UTC](https://openmc.discourse.group/t/python-api-with-depletion-library/2166/2 "2022-08-05T03:11:04Z")

</div>

@Inhyung You may want to look at this suggestion from a different project:

> **[libstdc++.so.6: version \`GLIBCXX\_3.4.29' not found · Discussion #3453 ·...](https://github.com/pybind/pybind11/discussions/3453#discussioncomment-1926590)**
>
> I run this in pybind11 mkdir build cd build cmake .. make check -j 4 got ERROR: ...... Traceback (most recent call last): File "/home/shizuku/code/python/pybind11/tests/test\_cmake\_build/subdir...

---

<div class="post-metadata">

**Author:** ![Inhyung](https://avatars.discourse-cdn.com/v4/letter/i/97f17d/32.png) [@Inhyung](https://openmc.discourse.group/u/Inhyung)\
**Post date:** [August 8, 2022, 5:05pm UTC](https://openmc.discourse.group/t/python-api-with-depletion-library/2166/3 "2022-08-08T17:05:55Z")

</div>

Hi @paulromano

Thank you so much for your help. I will take a look at it.

---

<div class="post-metadata">

**Author:** ![Jiankai](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/jiankai/32/1070_2.png) [@Jiankai](https://openmc.discourse.group/u/Jiankai)\
**Post date:** [August 9, 2022, 6:33pm UTC](https://openmc.discourse.group/t/python-api-with-depletion-library/2166/4 "2022-08-09T18:33:23Z")

</div>

Hi,

Have you solved this?  
In my case, I just removed the libstdc++.so.6 as follows:  
mv ~/anaconda3/lib/libstdc++.so.6 ~/anaconda3/lib/libstdc++.so.bp  
Hope it can solve your problem.

Best,  
Jiankai

---

<div class="post-metadata">

**Author:** ![Inhyung](https://avatars.discourse-cdn.com/v4/letter/i/97f17d/32.png) [@Inhyung](https://openmc.discourse.group/u/Inhyung)\
**Post date:** [August 9, 2022, 11:22pm UTC](https://openmc.discourse.group/t/python-api-with-depletion-library/2166/5 "2022-08-09T23:22:11Z")

</div>

Hi, @Jiankai

Not yet. I will try your way too. Thank you very much for your help.
