This page here has been created for the latest stable release of Salvus. You have chosen to view the documentation for another Salvus version. Please be aware there might be some small differences you have to account for.
The SalvusMesh, SalvusFlow, and SalvusOpt packages are part of a single Salvus Python module.
Please note that Python is not necessary for SalvusCompute and we don't recommend installing the Python packages on an HPC system or other big cluster by default.
Salvus currently requires an installation of Python 3.7 or 3.9. There are different ways to set this up and most should work fine. We recommend to install the latest Miniconda distribution and subsequent dependencies using the package manager Mamba.
Please note that the use of mamba
is optional, and that the user is
responsible for complying with the licenses provided by any Python package
used.
If you follow our recommended installation procedure you will first install
Miniconda and then create a new python environment using mamba
in which to
finally install Salvus and all dependencies. In case this is new to you there
are a lot of guides and instructions around, e.g. this
one.
Assuming you are following our recommendation of using mamba
, you can proceed
after installing Miniconda and mamba
with the instructions below.
The environment.yml describes a python envionment containing all dependencies
required to run Salvus. Additionally, it contains the Jupyter project, which we
recommend as an interface to Salvus.
Run the following command to obtain the list of dependencies.
curl https://mondaic.com/environment-py39.yml -o environment.yml
If the above does not work, you can also right click -> Save Link As ... to manually download the yaml file.
The next block will now install all python packages listed in the environment.
# Create a new environment with all required dependencies. mamba env create -n salvus -f environment.yml # Activate that environment. conda activate salvus
The environment will no longer be updated because Python 3.7 is deprecated.
However, a legacy environment can be installed using conda-lock
.
First, you need to install conda-lock
in the base environment using the
following command.
conda install -c conda-forge conda-lock --yes
Next, you need to download the conda-lock
file with all python dependencies.
curl https://mondaic.com/salvus-py37.conda-lock.yml -o salvus-py37.conda-lock.yml
If the above does not work, you can also right click -> Save Link As ... to manually download the yaml file.
The next block will now install all python packages listed in the environment.
# Create a new environment with all required dependencies. conda-lock install --name salvus salvus-py37.conda-lock.yml # Activate that environment. conda activate salvus
By now there should be some indication in your shell that you have an active Salvus python environment. Remember to always activate it, otherwise Salvus will not be available.