# Export OPENMC\_CROSS\_SECTIONS =

**URL:** <https://openmc.discourse.group/t/export-openmc-cross-sections/5309>\
**Category:** User Support\
**Created:** [March 10, 2025, 10:59am UTC](https://openmc.discourse.group/t/export-openmc-cross-sections/5309 "2025-03-10T10:59:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![limitlessea](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@limitlessea](https://openmc.discourse.group/u/limitlessea)\
**Post date:** [March 10, 2025, 10:59am UTC](https://openmc.discourse.group/t/export-openmc-cross-sections/5309/1 "2025-03-10T10:59:15Z")

</div>

Hello OpenMC community,

I’m encountering an issue with configuring the nuclear data library for OpenMC 0.15.0 on Linux and would appreciate your help.

Steps I’ve taken:

1. Installed OpenMC 0.15.0 via Conda in a dedicated environment (`openmc-env`).
2. Downloaded the `endf-b-vii.1` nuclear data library from the official OpenMC website.
3. Extracted the database into the `openmc-env/` directory (full path: `/anaconda/envs/openmc-env/`).
4. Set the environment variable:  
export OPENMC\_CROSS\_SECTIONS=“/path/to/openmc-env/nuclear\_data/cross\_sections.xml”  
Verified the path with echo  
$OPENMC\_CROSS\_SECTIONS, which returns the correct path.

I think that i unzipping the database to the wrong location?

---

<div class="post-metadata">

**Author:** ![pferney](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@pferney](https://openmc.discourse.group/u/pferney)\
**Post date:** [March 10, 2025, 5:17pm UTC](https://openmc.discourse.group/t/export-openmc-cross-sections/5309/2 "2025-03-10T17:17:45Z")

</div>

yes, try `ls /path/to/openmc-env/nuclear_data/` and if you don’t see a `cross_section.xml` file, you path is incorrect.

---

<div class="post-metadata">

**Author:** ![limitlessea](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@limitlessea](https://openmc.discourse.group/u/limitlessea)\
**Post date:** [March 11, 2025, 12:39pm UTC](https://openmc.discourse.group/t/export-openmc-cross-sections/5309/3 "2025-03-11T12:39:04Z")

</div>

(openmc-env) a1@LAPTOP-HBQ9I19M:/mnt/c/Users/Hai/PyCharmMiscProject$ ls /home/a1/anaconda3/envs/openmc-env/endfb-vii.1-hdf5/cross\_sections.xml  
/home/a1/anaconda3/envs/openmc-env/endfb-vii.1-hdf5/cross\_sections.xml  
(openmc-env) a1@LAPTOP-HBQ9I19M:/mnt/c/Users/Hai/PyCharmMiscProject$ export OPENMC\_CROSS\_SECTIONS=“home/a1/  
anaconda3/envs/openmc-env/endfb-vii.1-hdf5/cross\_sections.xml”  
(openmc-env) a1@LAPTOP-HBQ9I19M:/mnt/c/Users/Hai/PyCharmMiscProject$ echo $OPENMC\_CROSS\_SECTIONS  
home/a1/anaconda3/envs/openmc-env/endfb-vii.1-hdf5/cross\_sections.xml

why it cannot run? 😭

---

<div class="post-metadata">

**Author:** ![wahidluthfi](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/wahidluthfi/32/3375_2.png) [@wahidluthfi](https://openmc.discourse.group/u/wahidluthfi)\
**Post date:** [March 11, 2025, 11:33pm UTC](https://openmc.discourse.group/t/export-openmc-cross-sections/5309/4 "2025-03-11T23:33:05Z")

</div>

Hi Limitless,  
Just to make sure, what is the error message shown when you do the openmc run?

Also, I recommend you move your endfb-vii.1-hdf5 folder (neutron, photon, cross sections.xml, etc) to your home/a1. You can create a new folder to make it more organized and so that your data lib is not that deep within the conda environment.

---

<div class="post-metadata">

**Author:** ![cjwiguna](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/cjwiguna/32/3728_2.png) [@cjwiguna](https://openmc.discourse.group/u/cjwiguna)\
**Post date:** [March 13, 2025, 3:49pm UTC](https://openmc.discourse.group/t/export-openmc-cross-sections/5309/5 "2025-03-13T15:49:35Z")

</div>

There is also another way to add cross-section data at runtime, via this at the top of your simulation file:

```auto
openmc.config['cross_sections'] = "home/a1/anaconda3/envs/openmc-env/endfb-vii.1-hdf5/cross_sections.xml"
openmc.config['chain_file'] = "/path-to-chainfile-directory/chain_endfb80_pwr.xml"
...

```

edit: I guess it has something to do with the conda virtual environment, whether they pass the environment variable or not to the openmc terminal.
