Conda MOOSE Environment
Our preferred method for obtaining dependencies necessary for MOOSE-based application development is via Conda's myriad array of libraries. Follow these instructions to create an environment on your machine using Conda. At this time, an option to install MOOSE directly on a Windows system is not yet supported. On-going efforts are being made to add a conda installation option for Windows, and an experimental WSL option is available.
Install Miniconda3
Installing Miniconda3 is straight forward. Download, install, and configure. If you run into issues during these steps, please visit our troubleshooting guide for Conda.
Linux Users:
curl -L -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
Macintosh Users:
curl -L -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh bash Miniconda3-latest-MacOSX-x86_64.sh -b -p ~/miniconda3
With Miniconda installed to your home directory, export PATH, so that it may be used:
export PATH=$HOME/miniconda3/bin:$PATH
Configure Conda to work with conda-forge, and our INL public channel:
conda config --add channels conda-forge
conda config --add channels https://conda.software.inl.gov/public
If you find yourself using sudo conda
... something's not right. The most common reason for needing sudo, is due to an improper Conda installation. Conda should be installed to your home directory, without any use of sudo
.
Install MOOSE Conda Packages
Begin by creating the moose environment within conda, and attempt to activate it:
conda create --name moose -q -y
conda activate moose
During activation, you may be presented with an error such as the following:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
This error is trying to exlain how to initialize Conda for the first time for your given shell environment. Different operating systems use different shells. To understand what shell you are using, perform the following:
echo $0
What ever is returned is your shell. With that information in hand (if you received the above error to begin with) perform the following init command:
conda init SHELL_NAME
Where SHELL_NAME is the shell you discovered in the previous step. Once complete, close any terminals you have opened, and re-open them. Then run conda activate moose
again. If successful proceed to installing packages:
conda install moose-tools
conda install moose-libmesh
If you are running into additional errors, please see our troubleshooting guide for Conda.
Know that you will need to conda activate moose
again for each terminal window you open. If you wish to make this automatic, you can add that command to the end of your shell profile.
Cloning MOOSE
MOOSE is hosted on GitHub and should be cloned directly from there using git. We recommend creating a directory named projects to put all of your MOOSE related work.
To install MOOSE run the following commands in a terminal.
mkdir ~/projects
cd ~/projects
git clone https://github.com/idaholab/moose.git
cd moose
git checkout master
The master branch of MOOSE is the stable branch that will only be updated after all tests are passing. This protects you from the day-to-day changes in the MOOSE repository.
Compile and Test MOOSE
cd ~/projects/moose/test
make -j 4
./run_tests -j 4
If the installation was successful you should see most of the tests passing (some tests will be skipped depending on your system environment).
Head back over to the Install MOOSE page to continue your tour of MOOSE.
Uninstall Conda MOOSE Environment
If you wish to remove the moose environment at any time, you may do so using the following commands:
conda deactivate # if 'moose' was currently activated
conda remove --name moose --all