Install Using Conda (Advanced)

It is also possible to install SimNIBS using the Conda package manager.

Note

If the pip installation fails, please locate the appropriate wheel for your system on the release page (e.g., the latest), copy its address, and feed this directly to pip install, e.g.,

Windows

  1. Download and install the Miniconda Python 3 distribution.

  2. Download the SimNIBS Windows environment file

  3. Open Anaconda Prompt, which can be found in the Start Menu.

  4. Run in the Prompt:

conda env create -f "%USERPROFILE%\Download\environment_win.yml"
conda activate simnibs_env
pip install -f https://github.com/simnibs/simnibs/releases/latest simnibs

  1. (Optional) To setup the menu icons, file associations, the MATLAB library and add SimNIBS to the system path, run the postinstall_simnibs script:

md "%USERPROFILE%\SimNIBS"
postinstall_simnibs --setup-links -d "%USERPROFILE%\SimNIBS"

Linux

  1. Download and install the Miniconda Python 3 distribution.

  2. Download the SimNIBS Linux environment file

  3. Run in a terminal window:

export PATH="$HOME/miniconda/bin:$PATH" # This part can change depending on your miniconda installation
conda env create -f ~/Downloads/environment_linux.yml
conda activate simnibs_env
pip install -f https://github.com/simnibs/simnibs/releases/latest simnibs

  1. (Optional) To setup the menu icons, file associations, the MATLAB library and add SimNIBS to the system path, run the postinstall_simnibs script:

mkdir $HOME/SimNIBS
postinstall_simnibs --setup-links -d $HOME/SimNIBS

MacOS

  1. Download and install the Miniconda Python 3 distribution.

  2. Download the SimNIBS OSX environment file

  3. If you are using an Intel-based Mac (x86_64), run the following in a terminal window:

export PATH="$HOME/miniconda/bin:$PATH" # This part can change depending on your miniconda installation
conda env create -f ~/Downloads/environment_macOS.yml
conda activate simnibs_env
pip install -f https://github.com/simnibs/simnibs/releases/latest simnibs

If you are using an ARM-based Mac, you will have to create an x86_64 environment in order to build simnibs. Run this instead

export PATH="$HOME/miniconda/bin:$PATH" # This part can change depending on your miniconda installation
conda env create -f ~/Downloads/environment_macOS.yml --platform osx-64
conda activate simnibs_env
pip install -f https://github.com/simnibs/simnibs/releases/latest simnibs

If the --platform argument is not available in your version of conda, use the following workaround

export PATH="$HOME/miniconda/bin:$PATH" # This part can change depending on your miniconda installation
CONDA_SUBDIR=osx-64 conda env create -f ~/Downloads/environment_macOS.yml
conda env config vars set CONDA_SUBDIR=osx-64 -n simnibs_env
conda activate simnibs_env
pip install -f https://github.com/simnibs/simnibs/releases/latest simnibs

  1. (Optional) To setup the menu icons, file associations, the MATLAB library and add SimNIBS to the system path, run the postinstall_simnibs script:

mkdir -p $HOME/Applications/SimNIBS
postinstall_simnibs --setup-links -d $HOME/Applications/SimNIBS