Mamba Development News

It’s been a while since we’ve communicated on what’s new in mamba-land. Mamba is still fast, supports more of conda’s operations and has grown a much more stable backend with changes made to libsolv.

Wolf Vollprecht
3 min readJun 10, 2019
Speeding up the snake! (Image credits kubanek & Mozilla fxemoji)

What is mamba

Mamba is a drop-in replacement for conda, the awesome cross-platform package manager. In our opinion, conda has one tiny problem: it’s too slow when many packages are installed, or when installing multiple packages at the same time. Mamba still uses conda for almost everything, except for the dependency resolution part. We swapped out the conda solver for a different implementation called libsolv, a C library that already powers package managers on Linux systems such as Fedora’s dnf or OpenSuse’s zypper.

The command line interface, the environment handling, the package file format, installation process, the repodata format and everything else is exactly the same as with conda, and it is using the exact same Python code as conda for all of this functionality. So it’s really only the solver that’s different!

What’s new

The first good news is that our contribution to libsolv, Windows (MSVC) build support, was merged upstream. This means libsolv now works perfectly fine on all major operating systems (Windows, Linux and OS X). Additionally, Michael Schröder from OpenSUSE has helped us out tremendously by integrating support for conda into libsolv itself!

With the latest release of mamba, you can use mamba not only to install packages, but also update and uninstall.

For example, now

$ mamba update xtensor -c conda-forge

and

$ mamba remove numpy

work fine and much faster than with conda.

Thanks to the libsolv’s conda integration, packages should now be matched with the exact same logic as in Python. You can supply “difficult” specs on the command line, such as:

$ mamba install "blas=*=openblas"

Thanks to our friends at Binder/repo2docker the latest news is that we also support installation from yml files! I am happy to report that it passes all the tests in the repo2docker test suite!

$ mamba env create -f xstack.yml

Where xstack.yml is a yml file that corresponds to the conda format.

And last but not least, mamba lost its alpha label. You can now download it from the default conda-forge channel:

conda install mamba -c conda-forge # or ... 
mamba update mamba -c conda-forge # of course ;)

Mamba in Mini: minimamba!

Just like conda has miniconda as a way to obtain a minimal base-conda installation, we now have a minimamba which uses the exact same installer mechanism to bootstrap a mamba installation. We are really excited about this as this will also allow us to soon use mamba for our CI processes where it potentially speeds up builds in the future!

UPDATE (Dec 2020): You can find the up-to-date download page at https://github.com/conda-forge/miniforge#mambaforge

Further development

While we’re already pretty happy with mamba, and use it as our daily driver for installations, there are some areas where we still need to invest work:

  • Refactor code base to be a direct replacement for conda’s solver class so we can run the conda test suite and integrate it upstream more easily
  • Add download indicators when downloading repository data
  • Add support to select “features” and feature tracking
  • Allow updating all installed packages (currently only selected packages can be updated, e.g. mamba update xtensor numpy )

And some more changes like this — most of them are not very difficult to implement but require some time. We are still thinking about creating a KickStarter or something alike to secure some funding to make this work sustainable.

If you are interested in contributing, mamba is an open source project, and you can find the source code on https://github.com/QuantStack/mamba

If you want to stay up to date, follow me on Twitter: https://twitter.com/wuoulf

--

--

Wolf Vollprecht

I work as a scientific and robotics software developer for QuantStack in Paris and Berlin. We do Open Source for a living!