# OpenMC cross\_section.xml problem

**URL:** <https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698>\
**Category:** User Support\
**Created:** [August 15, 2020, 4:53pm UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698 "2020-08-15T16:53:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![huak95](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/huak95/32/1442_2.png) [@huak95](https://openmc.discourse.group/u/huak95)\
**Post date:** [August 15, 2020, 4:53pm UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/1 "2020-08-15T16:53:27Z")

</div>

Hi there,

I’m new in OpenMC and need some help.  
I using openMC on macOS Catalina install via conda. As tutorial [here](https://docs.openmc.org/en/stable/quickinstall.html)  
Furthermore I use Jupyter notebook for writing code. Then I tried example \>\> post\_procesing [here](https://docs.openmc.org/en/stable/examples/post-processing.html) I have no issue until

```
ln[9]: plot = openmc.Plot.from_geometry(geometry)
       plot.pixels = (250, 250)
       plot.to_ipython_image()

```

**I got this error**

```
 Reading settings XML file...
 ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.

```

But, I already download the file Official Data Libraries [here](https://openmc.org/official-data-libraries/) I download ENDF/B-VII.1 and put it in /Users/saksorn/opt/data/endf  
Next I set a PATH like this by using vim .zprofile in terminal  
 ![Screen Shot 2563-08-15 at 23.53.12](https://global.discourse-cdn.com/free1/uploads/openmc/original/1X/8d2561a9d61a94c9dbd77cf873b39c71afa8b96b.png)  
then I try again but it’s have the same error.

Moreover when I install OpenMC via conda it dosen’t have a OpenMC in home directory.  
It install here  
`/Users/saksorn/opt/miniconda3/envs/openmc-env/lib`  
I don’t know is that will effect the program or not.

Thank you, saksorn.

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [August 15, 2020, 5:39pm UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/2 "2020-08-15T17:39:56Z")

</div>

OpenMC cross\_section path variable

```auto
export OPENMC_CROSS_SECTIONS='/Users/saksorn/opt/data/endf/cross_sections.xml'
export OPENMC_CROSS_SECTIONS

```

> [@huak95](#):
>
> Moreover when I install OpenMC via conda it dosen’t have a OpenMC in home directory.  
> It install here  
> `/Users/saksorn/opt/miniconda3/envs/openmc-env/lib`  
> I don’t know is that will effect the program or not.

It will not affect the program.

---

<div class="post-metadata">

**Author:** ![huak95](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/huak95/32/1442_2.png) [@huak95](https://openmc.discourse.group/u/huak95)\
**Post date:** [August 16, 2020, 3:48am UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/3 "2020-08-16T03:48:03Z")

</div>

It’s work fine!  
Thank you so much, Pranto.

It’s will be the same in ubuntu right?

```
export OPENMC_CROSS_SECTIONS='/Users/saksorn/opt/data/endf/cross_sections.xml'
export OPENMC_CROSS_SECTIONS
```

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [August 16, 2020, 3:55am UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/4 "2020-08-16T03:55:52Z")

</div>

> [@huak95](#):
>
> It’s work fine!

Glad to hear it.

> [@huak95](#):
>
> It’s will be the same in ubuntu right?

Yep. It will be the same also for ubuntu @huak95

---

<div class="post-metadata">

**Author:** ![Nilormi](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nilormi](https://openmc.discourse.group/u/Nilormi)\
**Post date:** [March 29, 2023, 2:38pm UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/5 "2023-03-29T14:38:56Z")

</div>

> [@huak95](#):
>
> ```auto
> export OPENMC_CROSS_SECTIONS='/Users/saksorn/opt/data/endf/cross_sections.xml'
> export OPENMC_CROSS_SECTIONS
> 
> ```

@Pranto Exactly where shall I type it? It didnot work for me when I typed them inside the openmc-env.

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [April 10, 2023, 12:52pm UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/6 "2023-04-10T12:52:42Z")

</div>

@Nilormi If you’re using `bash`, you can add `OPENMC_CROSS_SECTIONS` env variable in your `.bashrc` file. If you’re using `zsh`, then you should write them in your `.zshrc` file instead. Both of these files are typically located in your `home` directory. To know which shell are you using, use the following command:

```bash
echo $0

```

---

<div class="post-metadata">

**Author:** ![Nilormi](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nilormi](https://openmc.discourse.group/u/Nilormi)\
**Post date:** [April 10, 2023, 3:47pm UTC](https://openmc.discourse.group/t/openmc-cross-section-xml-problem/698/7 "2023-04-10T15:47:09Z")

</div>

@Pranto Thank You. But I did resolve this issue already.

I am now trying to create geometry .
