# Problem with using Jupyter Notebook

**URL:** <https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682>\
**Category:** User Support\
**Created:** [February 5, 2022, 5:16am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682 "2022-02-05T05:16:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yos](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@Yos](https://openmc.discourse.group/u/Yos)\
**Post date:** [February 5, 2022, 5:16am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/1 "2022-02-05T05:16:33Z")

</div>

Hi all,  
I am new to OpenMC. I have installed the OpenMC 0.10.0 on Ubuntu 20.04 via Windows Subsystem for Linux (WSL). And then I update OpenMC to 0.11.0 version

 ![เก็บ](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/d/def10726c28d676cd57af78aff34e2945affe9c7.jpeg)  
And then, I have installed Jupyter notebook  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/d/ddcb221fc336a23f6fed9cf9849ccd87d0e705ee.jpeg)  
I have created python files on visual studio code and get xml files followed by this  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/9/9e672288dc74484e90ddc1fc8d10470b625db4aa.png)  
I try to run simulation and get statepoint.50.h5 but when I open jupyter notebook and load the statepoint file it shows.  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/8bde13717d34031076ed8514c265d951b3ee29f3.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/8d7231096b1b1cfbb3370a55e5dfa319d19911a4.png)  
Can’t anyone help me.

---

<div class="post-metadata">

**Author:** ![imtiaj\_hossain](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@imtiaj\_hossain](https://openmc.discourse.group/u/imtiaj_hossain)\
**Post date:** [February 5, 2022, 10:29am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/2 "2022-02-05T10:29:24Z")

</div>

import openmc  
Sp=openmc.statepoint(‘statepoint.100.h5’)

This should solve your problem.

---

<div class="post-metadata">

**Author:** ![Yos](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@Yos](https://openmc.discourse.group/u/Yos)\
**Post date:** [February 5, 2022, 11:07am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/3 "2022-02-05T11:07:37Z")

</div>

Thank you @imtiaj_hossain for your suggestion but when I import openmc it shows error.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/4/4535a6aec7ef66b7a127790eecebd1ffa955fc0f.png)

I don’t know why.

---

<div class="post-metadata">

**Author:** ![imtiaj\_hossain](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@imtiaj\_hossain](https://openmc.discourse.group/u/imtiaj_hossain)\
**Post date:** [February 5, 2022, 1:52pm UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/4 "2022-02-05T13:52:09Z")

</div>

I’m not sure why it is happening though.but try to install openmc using conda forge as per the instruction given here.

[https://anaconda.org/conda-forge/openmc](https://anaconda.org/conda-forge/openmc)

---

<div class="post-metadata">

**Author:** ![Yos](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@Yos](https://openmc.discourse.group/u/Yos)\
**Post date:** [February 6, 2022, 6:30am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/5 "2022-02-06T06:30:19Z")

</div>

Hello @imtiaj_hossain, I have installed openmc as per your suggestion.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/3/352e13a0a6ea3733a3abf219b2704b4e469055c5.jpeg)  
And then I try to open jupyter notebook and run it again but it still shows an error.  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/6/60328898f5f5c22715fc548fb8b9554092293234.png)  
I create ipynb in the same location as the statepoint.50.h5 file.  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/3/397c642550b8274fbd2ad1eb74ff45715cc606b9.png)

Cheers,

---

<div class="post-metadata">

**Author:** ![imtiaj\_hossain](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@imtiaj\_hossain](https://openmc.discourse.group/u/imtiaj_hossain)\
**Post date:** [February 6, 2022, 7:02am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/6 "2022-02-06T07:02:50Z")

</div>

You’ve installed openmc successfully. But sorry to say, i don’t know why it isn’t working now.

---

<div class="post-metadata">

**Author:** ![Yos](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@Yos](https://openmc.discourse.group/u/Yos)\
**Post date:** [February 6, 2022, 7:07am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/7 "2022-02-06T07:07:35Z")

</div>

That’s ok. Thank you for helping. I appreciate it.

---

<div class="post-metadata">

**Author:** ![Yos](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@Yos](https://openmc.discourse.group/u/Yos)\
**Post date:** [February 6, 2022, 1:25pm UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/8 "2022-02-06T13:25:36Z")

</div>

Hi @imtiaj_hossain , I have a few wonders about the jupyter notebook on window sub linux. I wonder the jupyter notebook can not support on the WSL? so it shows the red error.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/a/a7e62f628b41c5769ef78c0eb66ed7280ce03f09.png)

This maybe effects when I use jupyter notebook to load statepoint h5 file and It show error that it can not find the data. Do you have any ideas?

Cheers,

---

<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:** [February 8, 2022, 4:54am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/9 "2022-02-08T04:54:21Z")

</div>

@Yos The error you’re getting says that the statepoint file is not compatible with your version of OpenMC. You’ll need to rerun your simulation to get a new statepoint file, at which point you should be able to load it in the Python API.

---

<div class="post-metadata">

**Author:** ![Yos](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@Yos](https://openmc.discourse.group/u/Yos)\
**Post date:** [February 8, 2022, 5:38am UTC](https://openmc.discourse.group/t/problem-with-using-jupyter-notebook/1682/10 "2022-02-08T05:38:26Z")

</div>

Thank you @paulromano for your suggestions. Now I can load it. I think it is because I don’t upgrade h5py to the latest version when I upgraded openmc-10 to openmc-11.
