Developer Install: Conda (Windows)

commentnote:Feedback welcome

These instructions were recently updated. If anything is unclear or you have suggestions for improvement, please share your feedback in this GitHub discussion.

The following instructions describe the use of a pre-built Conda development environment on Windows to build and execute MOOSE and MOOSE-based applications. The Conda development environment does not contain pre-built versions of MFEM, libTorch, and NEML2. If you want to use these optional packages, you will need to also install those dependencies yourself.

To begin, follow these instructions:

  1. Install WSL: Install Windows Subsystem for Linux (WSL).

  2. Install Miniforge: Install Miniforge to enable the creation of Conda environments.

  3. Create Environment: Create the Conda environment that contains the required dependencies.

  4. Activate Environment: Activate the created Conda environment that contains the required dependencies.

  5. Build and Test: Build and test an application.

After the environment has been created, you can use it again in another WSL terminal window by repeating the instructions in Activate Environment.

If you need to update the environment, follow the instructions in Updating.

Install WSL

First, Windows Subsystem for Linux (WSL) must be installed. Open PowerShell or Windows Command Prompt in administrator mode by right-clicking the application and selecting "Run as administrator". In the prompt that appears, run the following command:


wsl --install

This command will require a restart. Restart your computer after the command completes. Once the restart is complete, a prompt will appear on next boot continuing the Ubuntu Linux installation and requesting a username for the new Linux user account. After this, a new Linux bash prompt running in WSL will appear. Run the following in the new bash prompt (in WSL) to update packages:


sudo apt update
sudo apt upgrade

You may now close the new WSL window.

By default, this will install Ubuntu 24.04 (the recommended distribution). If you have changed the default, we suggest using Ubuntu 24.04.

commentnote

All commands provided in the remaining instructions must be run within the WSL window! This includes the git clone of the application.

To open a new WSL window, search for "Ubuntu" within the Start Menu. In addition, you can run the wsl command within any Command Prompt or PowerShell window.

You do not need to run any of these as administrator; administrator access is only needed to install the WSL distribution!

Install Miniforge

Miniforge must be installed within the WSL instance to provide the Conda environment for installing packages. Miniforge only needs to be installed once. If you run into issues during these steps, please visit our Conda Troubleshooting guide.

Open a new WSL ubuntu window. First, run the following:


curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh -b -p ~/miniforge

With Miniforge installed in your home directory, initialize it so that it can be used in other terminal windows:


PATH=$HOME/miniforge/bin:$PATH conda init --all

Next, close the terminal window that was used to run the command above and open a new one. In the new terminal window, you should see your prompt prefixed with (base). This indicates you are in the base environment, and that Conda is ready for operation.

In this new terminal window, update the base Conda environment:


conda update --all --yes

Lastly, add INL's public channel to gain access to INL's Conda package library:


conda config --add channels https://conda.software.inl.gov/public

Create Environment

After installing Miniforge (by following the instructions immediately above), a unique Conda environment will be created named moose with the packages that contain the environment:

conda create -n moose-dev moose-dev=2026.05.08=mpich

If you are running into errors, please see our troubleshooting guide for Conda.

Activate Environment

Now that the moose-dev Conda environment has been installed, run the following to activate it:


conda activate moose-dev

To utilize this environment in other terminal windows, the command above must be ran first. Once this activation command is ran, the compilers and dependencies for building MOOSE or a MOOSE-based application will be available.

Build and Test

After following the instructions above to setup the environment, we will next build and test MOOSE or a MOOSE-based application.

All of the commands that follow must be ran within a terminal window in which you have ran conda activate moose first as described in Activate Environment.

Follow the instructions in Build and Test: MOOSE if you are building MOOSE. Otherwise, follow the instructions in Build and Test: MOOSE Application.

Build and Test: MOOSE

In this example, we will test the MOOSE framework. You should run this example if you are using this development environment to develop MOOSE itself. Here, we assume that a MOOSE repository is available within ~/projects/moose. If you have cloned MOOSE in a different location, you should replace the directory in the first command that follows with the directory in which MOOSE is cloned.


cd ~/projects/moose
cd test
make -j 4
./run_tests -j 4

The above will compile the MOOSE test application and run the tests.

You can also build and test the MOOSE combined application (which contains all of the physics modules) if you wish with the following:


cd ~/projects/moose/modules
make -j 4
./run_tests -j 4

Build and Test: MOOSE Application

In this example, we will test building and running tests for a MOOSE-based application. You should run this example if you are using this development environment to develop a MOOSE-based application.

Run the following, replacing the directory in the first command (/path/to/app) to the directory that your MOOSE-based application is cloned to:


cd /path/to/app
make -j 4
./run_tests -j 4

The above will compile the MOOSE-based application and run its tests.

Updating

Due to how Conda manages dependencies, we typically suggest that you recreate the environment instead of update it.

If you have already followed the instructions above to create the environment, you should then run:

conda env remove -n moose-dev
conda create -n moose-dev moose-dev=2026.05.08=mpich

This will remove the previous environment and create a new environment with the current version.

After running the above, then run:


conda activate moose-dev

as usual to utilize the environment.

Uninstall

To uninstall the development environment, run the following:


conda activate base
conda env remove -n moose-dev