# Problem Installing OpenMC on Manjaro

**URL:** https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425
**Category:** User Support
**Created:** [June 20, 2024, 4:25pm UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425 "2024-06-20T16:25:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sauravquantum](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@sauravquantum](https://openmc.discourse.group/u/sauravquantum)
#### Post date: [June 20, 2024, 4:25pm UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425/1 "2024-06-20T16:25:28Z")

</div>

I am using the openmc tutorial by Copenhagen Atomics ([https://youtu.be/sCDT5ZAeJcY?si=GwApix-8RGlTcHgu](https://youtu.be/sCDT5ZAeJcY?si=GwApix-8RGlTcHgu)) to download OpenMC. I am stuck on the error:

RuntimeError: Failed to open HDF5 file with mode ‘r’: /opt/nuclear-data/endfb-vii.1-hdf5/neutron/U235.h5

I get this error when doing: bash ./test\_install.sh

Please help

---

<div class="post-metadata">

### Author: ![campagnani](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/campagnani/32/3201_2.png) [@campagnani](https://openmc.discourse.group/u/campagnani)
#### Post date: [June 20, 2024, 6:48pm UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425/2 "2024-06-20T18:48:08Z")

</div>

Please, run the command and show the output to us:

ls /opt/nuclear-data/endfb-vii.1-hdf5/neutron/U235.h5

---

<div class="post-metadata">

### Author: ![sauravquantum](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@sauravquantum](https://openmc.discourse.group/u/sauravquantum)
#### Post date: [June 21, 2024, 1:16pm UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425/3 "2024-06-21T13:16:03Z")

</div>

This is the output:

ls: cannot access ‘/opt/nuclear-data/endfb-vii.1-hdf5/neutron/U235.h5’: No such file or directory

---

<div class="post-metadata">

### Author: ![campagnani](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/campagnani/32/3201_2.png) [@campagnani](https://openmc.discourse.group/u/campagnani)
#### Post date: [June 21, 2024, 1:58pm UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425/4 "2024-06-21T13:58:37Z")

</div>

So you alread know the problem is with nuclear-data (cross sections files), not in openmc.

Install nuclear-data correctly:

```auto
git clone https://aur.archlinux.org/nuclear-data.git
cd nuclear-data
makepkg -si

```

Or use paru to install it:

```auto
paru -S nuclear-data

```

(or use yay or any other of your preference)

The package nuclear-data let you choose between 4 cross sections (or you can choose all):

> endfb71  
> endfb80  
> jeff33  
> fendl32

The cross sections will go folder: /opt/nuclear-data/  
Inside will have a folder of what kind you choose.

Inside this folder will have 3 folder’s: neutron, photon and another I forget.

Inside neutron folder will have 1 file .h5 to each cross section: u235.h5, u238.h5, etc

To run openmc daily you should specificy the crosssection folder. You can do it on python code ou export a variable contain this folder before run openmc:  
`export OPENMC_CROSS_SECTIONS=/opt/nuclear-data/endfb-vii.1-hdf5/cross_sections.xml`

To don’t need export this variable every time manually, put this comand on your file .bashrc (of your user).

---

<div class="post-metadata">

### Author: ![sauravquantum](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@sauravquantum](https://openmc.discourse.group/u/sauravquantum)
#### Post date: [June 21, 2024, 2:30pm UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425/5 "2024-06-21T14:30:58Z")

</div>

Ok, I tried what you did, and I get the same pymoab error but there is nothing about the runtime:

bash ./test\_install.sh  ✔  
Traceback (most recent call last):  
File “/home/sauravquantum/.cache/yay/openmc-git/step\_to\_h5m.py”, line 2, in   
import CAD\_to\_OpenMC.assembly as ab  
File “/usr/lib/python3.12/site-packages/CAD\_to\_OpenMC/assembly.py”, line 18, in   
from pymoab import core, types  
ModuleNotFoundError: No module named ‘pymoab’  
/usr/lib/python3.12/site-packages/openmc/stats/multivariate.py:829: FutureWarning: The ‘only\_fissionable’ has been deprecated. Use the ‘constraints’ argument when defining a source instead.  
warn("The ‘only\_fissionable’ has been deprecated. Use the "  
/usr/lib/python3.12/site-packages/openmc/source.py:656: FutureWarning: This class is deprecated in favor of ‘IndependentSource’  
warnings.warn(“This class is deprecated in favor of ‘IndependentSource’”, FutureWarning)  
Traceback (most recent call last):  
File “/home/sauravquantum/.cache/yay/openmc-git/test\_openmc.py”, line 59, in   
openmc.run()  
File “/usr/lib/python3.12/site-packages/openmc/executor.py”, line 314, in run  
\_run(args, output, cwd)  
File “/usr/lib/python3.12/site-packages/openmc/executor.py”, line 97, in \_run  
p = subprocess.Popen(args, cwd=cwd, stdout=subprocess.PIPE,  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.12/subprocess.py”, line 1026, in **init**  
self.\_execute\_child(args, executable, preexec\_fn, close\_fds,  
File “/usr/lib/python3.12/subprocess.py”, line 1955, in \_execute\_child  
raise child\_exception\_type(errno\_num, err\_msg, err\_filename)  
FileNotFoundError: [Errno 2] No such file or directory: ‘openmc’  
rm: cannot remove ‘_.h5’: No such file or directory  
rm: cannot remove '_.stl’: No such file or directory  
rm: cannot remove ‘\*.h5m’: No such file or directory

---

<div class="post-metadata">

### Author: ![campagnani](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/campagnani/32/3201_2.png) [@campagnani](https://openmc.discourse.group/u/campagnani)
#### Post date: [June 23, 2024, 12:32am UTC](https://openmc.discourse.group/t/problem-installing-openmc-on-manjaro/4425/6 "2024-06-23T00:32:48Z")

</div>

The error is write here:

> [@sauravquantum](#):
>
> ModuleNotFoundError: No module named ‘pymoab’

That is: Pymoab isn’t installed.

Maybe you just install moab packege from AUR can solve this:

```auto
git clone https://aur.archlinux.org/moab.git
cd moab
makepkg -si

```

or:

```auto
paru -S moab

```

But I need say something: your questions is very easy to solve, just read the error code… So that means you are a new user on GNU/Linux or at least a basic user…  
In this case I recomend don’t compile from source the code, because this is a advance way to install OpenMC that you have control about are you are installing or not (but you need to learn to solve the basic problems by yourself).

So I will let a script to install OpenMC from conda, that is much more easy to install because alredy come compilled. But you shoud read the OpenMC docs anyway: [Quick Install Guide — OpenMC Documentation](https://docs.openmc.org/en/v0.12.1/quickinstall.html)

```auto
paru -S nuclear-data miniconda3

echo """

#MiniConda
[-f /opt/miniconda3/etc/profile.d/conda.sh] && source /opt/miniconda3/etc/profile.d/conda.sh
export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1

#OpenMC Cross Sections
var=`echo /opt/nuclear-data/*hdf5 | head -n1`
export OPENMC_CROSS_SECTIONS=$var/cross_sections.xml
""" >> ~/.bashrc

source /opt/miniconda3/etc/profile.d/conda.sh
conda config --add channels conda-forge
conda create -n openmc-env openmc[version=0.14.0,build=nompi_py312hecd8f91_1]

```

This will install the miniconda3 aur package, use conda to create a envrolviment and install openmc in this envrolviment.

So every time you want to user openmc, you should activate this envrolvment after open the terminal:

```auto
conda activate openmc-env

```

If you don’t wanna this command every time after open the terminal, put on .bashrc:

```auto
echo "conda activate openmc-env" >> ~/.bashrc

```

You can figure out another versions of OpenMC with the command:

```auto
conda search openmc

```

Recently they release the 0.15.0 version.  
Today this version is not on conda yet, but you can check it later and install new version when you want. For now you can start to use the 0.14.0 version.
