anacondacondamamba

install mamba on top of anaconda 2023.09 fresh reinstall


I am using Windows Server, and installed Anaconda v2023.09 as my environment. I wanted to install mamba, so I called

conda install mamba -c conda-forge

However, this process is almost taking forever. I wonder is there any kind of way I can accelerate such installation?

Before mamba installed, I realized it is now almost impossible to use conda install anything more on top since solving will take forever. But installing mamba itself would conda again.... Wondering if we can achieve anything like a fast installation.... (like an installation ignoring all depencies and only after mamba is installed, fixed the dependencies using mamba/ or pip install/ or some kind of manual install)


Solution

  • Do not install Mamba in Anaconda/Miniconda

    It is no longer recommended to install mamba in an Anaconda or Miniconda base. However, Conda now uses the libmamba solver, so just upgrade your base conda to v23.11.0 or greater and it will run as fast as mamba.

    ## v23.11+ uses libmamba solver
    conda install -n base -n defaults 'conda>=23.11'
    

    The main problem currently is that mamba is only served from Conda Forge channel and Conda Forge packages require that channel to be prioritized. In practice that simply does not work with Anaconda base. The least painful resolution would be for Anaconda to build their own copy of mamba and serve it from the anaconda (defaults) channel.

    More generally, one should simply not be installing anything from Conda Forge in Anaconda base.

    Consider Micromamba

    A newer solution is Micromamba which is static and doesn't live in an environment. It is extremely useful for creating Conda environments without having to install a Conda base (such as provisioning in CI or containers). I expect more users will continue to adopt it since it properly separates the functionality of manipulating Conda environments from a Conda environment (base).