# Using Mamba to install Conda packages

[Mamba](https://mamba.readthedocs.io/en/latest/) is an alternative to Conda package manager. The main advantage is its speed regarding dependency resolution.

#### Setting up Mamba

The proposed installation is based on `micromamba` and doesn't require any installation on the cluster. You just have to add the following line to your `~/.bashrc` file:

```
export MAMBA_ROOT_PREFIX="/work/FAC/INSTITUTE/PI/PROJECT/mamba_root"
```

Of course, replace `/work/FAC/INSTITUTE/PI/PROJECT` with the path corresponding to your project.

Then, you just have to load the module and run the initialization process with the following command:

```
module load micromamba
mamba_init
```

Finally, you have to logout from the cluster and the environment will be properly configured at the next login.

#### <span class="pre">Using Mamba</span>

<span class="pre">Instead of using `conda` commands, you can replace `conda` with `micromamba`. For instance:</span>

```
micromamba create --prefix ./my_mamba_env
micromamba activate ./my_mamba_env
micromamba install busco -c conda-forge -c bioconda
busco -v
micromamba deactivate
```

#### Restriction

<span style="background-color: rgb(251, 238, 184);">You cannot use Mamba with virtual environment created previously with Conda. Such environments must be recreated.</span>