Having problem while downloading OpenMC with Anaconda after successful download of conda, mamba, & mamba install OpenMC but still can't proceed to "install OpenMC" having error message saying: " OpenMC does not exist" what should I do?


This looks like you are trying to install openmc on a windows OS. There is an effort to make openmc available for windows but currently it is not nerged into the main branch. Here is the pull request if you want to try it out

Hi IbrahimDgreat,
You might want to try Shimwell’s suggestions, but if you want to use the typical Linux workflow, I think it would be better. some parts need to be done or checked.

You don’t need to make dual booting on your Windows machine because from Win 10 pro - Win 11 there is WSL (Windows subsystem Linux) which could give you the Linux terminal and its basic Linux environment. Their documentation can be read here

To use WSL, you are gonna need to turn on the Windows feature for WSL and virtual machine and follow the instructions for manual installation. Then you can start to set up the Linux environment from your administrator cmd (command prompt)

wsl --install #to install wsl
wsl --list --online #to see which linux distro available online. If you want to use Ubuntu, then
wsl --install -d Ubuntu # this will install Ubuntu to your windows 

After that, you will have the Ubuntu terminal on your system. You will asked to make a username and super user password for your local Ubuntu profile. Then I recommend you to update and upgrade your Ubuntu, install some basic compiler

sudo apt update
sudo apt upgrade 
sudo apt build-essential

After that step, you have a functional Ubuntu/Linux distribution environment ready to use. I think you just need to do this one time because after this steps you can find Ubuntu from your Windows search and open the terminal anytime.
You can also check it from your administrator cmd

wsl -l -v # to list the installed Linux distribution you have on your machine

There will be a new Linux icon at the left bottom of your Windows Explorer. That is the path to access your Linux side from your windows. On the other hand, if you want to go to your Windows side from Linux, you can access the Windows partition from the /mnt/ directory from Linux root. It will take time but practice makes perfect.

After that, you will need an editor that also connects to your Ubuntu side from WSL. I am using Visual Studio code since it has a good extension for WSL and it can directly connect to your Linux distribution after you install the WSL extension. Since there is a rich Python API in openmc, I recommend you install a Python extension from your Visual Studio code, and also the jupyter notebook extension. You can read some documentation about visual studio code online, like this one

Then the best part of it, getting the openmc.
I think you have visited this detailed installation documentation
https://docs.openmc.org/en/latest/usersguide/install.html#usersguide-build
All download options for Linux provided in the documentation should work perfectly on the Linux side, you will need to do that from your Linux/Ubuntu terminal. You can choose between the conda-mamba options, docker options, spack, or compiling from source.
If something happens during this steps, try to find the solution online from the error message shown in your Linux/Ubuntu terminal because sometimes the error shows up cause we forgot to install some dependency or prerequisites.
Like there is specific documentation to install conda from a Linux terminal
https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html
I am compiling my openmc from source and it was challenging, but a long time ago I tried conda and I think you can continue to install openmc from conda if you want to.
Copenhagen Atomics has made some videos to set up the openmc from docker, so you can read the documentation for openmc Docker and see how they do on their Linux distribution before you try to your installed Linux distribution. Because the workflow is quite similar between Linux distributions.

After that, you can check whether you have a fully operational openmc or not by

which openmc # to find the path to the binary openmc file
openmc --version # to know which version of openmc exists in your system 
echo $OPENMC_CROSS_SECTIONS # to get the path to your nuclear data xsdir

You might want to test your openmc first, and I think this topic can help you

Greetings, sorry for using this old thread but it is similar to a problem I have.
After trying to install from source in WSL without success I tried using conda forge and mamba to install openmc and it seemed to get installed properly, but when I try to run it, or check version for it, I get the following error, which googling doesn’t show me anything helpful. I include one screenshot in this message and another in the following message ( the error is too large for one screenshot )


The second part of the error.

Hi MATinTC, Welcome to openmc community.
Sorry that you didn’t successfully compile your openmc from source. May I know which part of the openmc building process that didn’t success? Was it during make process? What is the error pop up on your screen? Maybe other members has also encounter similar error and know the solution.

I am regularly using openmc from WSL and compile from the source, and the last time I tried conda is on other PC of my colleagues, but it is a long time ago with version 0.14.0. I am only follow the instructions at the documentation and somehow it works. So I don’t have any experience with the recent version of openmc. Have you tried to install other version of openmc?

I think mamba search openmc will show the all versions of OpenMC that are available on the conda-forge channel.

But I am also seeing the core dumped error which might come from other error in your input.
You might want to try to run a simple input from example folder just to make sure that the openmc has been installed successfully.

Thanks for the response, I see that openmc is not installed properly, may I ask how to re install it properly or how to fix it?

I think it will depend on the state of your current installation process. Are you trying to use WSL and compile from source?
Have you prepared the all Prerequisites needed by openmc? Most of it can be installed when you install build-essential sudo apt install build-essential but you can install it separately using sudo apt install.
Have you configured your openmc cmake .. successfully? There are various options on configuring openmc as shown in the documentation.

I am installing it using wsl and conda (mini forge in this case), not installing it from source

Sorry, I have not much experience with conda installation, So I think I only recommended you to follow the instructions >> Installing on Linux/Mac with Mamba and conda-forge
Disclaimer: I am using miniconda at that time and not using other conda installation, so I have no experience with other installation methods.

Have you add conda-forge to your conda channel? openmc can be installed via the conda-forge channel with mamba.
conda config --add channels conda-forge

Since conda create dedicated openmc environment openmc-env, then if you think something is not work properly, you could (at last) delete this environment and start again following the instructions.

conda env list
conda deactivate # to deactivate current env 
conda remove --name openmc_env --all # if openmc_env is your openmc environment name

Also make sure that your new openmc environment use python 3.10+ version because the latest openmc version supports Python 3.10+.