micromamba
Manage Conda environments and packages
TLDR
Create a new environment at a specific path, installing named packages into it
Activate an environment by name or path
Run a command inside an environment without activating it in the shell
Install packages into the currently active environment
List all installed packages in the current environment
Search for packages in channels or current environment
Query tree-like dependencies of a package
Show information about the current micromamba setup
SYNOPSIS
micromamba <command> [<args>]
Common commands:
micromamba install [options] <package> [package...]
micromamba create [options] -n <env_name> [package...]
micromamba activate <env_name_or_path>
micromamba shell [init|activate|deactivate|hook|cleanup]
micromamba list [options]
micromamba remove [options] <package> [package...]
micromamba run [options] <executable> [args...]
micromamba config <subcommand> [options]
PARAMETERS
--help, -h
Display help message for a command or global options.
--version
Show the micromamba version and exit.
--yes, -y
Do not ask for confirmation; execute actions immediately.
--dry-run
Perform a trial run without executing changes.
--channel <channel_name_or_url>, -c <channel_name_or_url>
Specify additional conda channels to search for packages.
--prefix <path>, -p <path>
Path to the target environment prefix.
--name <env_name>, -n <env_name>
Name of the target environment (for create/activate/remove).
--root-prefix <path>
Path to the micromamba root directory (where environments are stored).
--always-copy
Copy packages instead of hard-linking or sym-linking them.
--no-deps
Do not install dependencies; only install specified packages.
--platform <platform>
Override the detected platform (e.g., linux-64, osx-arm64).
--file <yaml_file>, -f <yaml_file>
Install packages from an environment specification YAML file.
--override-channels
Do not use the default channels; only use specified channels.
--update-all
Update all packages in the environment (for install or update).
DESCRIPTION
micromamba is a modern, cross-platform package manager and environment management system, serving as a re-implementation of the core conda functionality in C++. It was developed to address some of the performance and distribution challenges associated with the original conda and mamba tools. Unlike its Python-based predecessors, micromamba is distributed as a single, statically linked executable, making it exceptionally fast, lightweight, and easy to deploy in various environments, including CI/CD pipelines, containerized applications, and embedded systems.
It provides robust capabilities for creating, managing, and activating isolated software environments, resolving complex package dependencies efficiently, and fetching packages from conda channels like conda-forge. Its compact size and speed make it an ideal choice for users who need conda's power without the overhead, or for automated scripting where minimal footprint and rapid execution are critical. micromamba aims for full compatibility with conda environments and channels, allowing seamless integration into existing conda workflows.
CAVEATS
micromamba provides excellent conda compatibility but might not support every niche feature or old configuration specific to the full conda distribution (e.g., certain legacy package types or very specific build tooling). Its shell integration requires an explicit micromamba shell init <shell> command to properly configure environment activation for your shell. While highly stable, active development means new features and minor behavioral changes can occur between versions.
<B>SHELL INTEGRATION</B>
For proper environment activation (e.g., modifying your PATH when using micromamba activate), you need to initialize your shell. Run micromamba shell init <your_shell_name> (e.g., bash, zsh, fish) and then restart your shell or source its configuration file. This adds the necessary micromamba hooks.
<B>PORTABILITY & DISTRIBUTION</B>
One of micromamba's key advantages is its distribution as a single static executable. This makes it highly portable: you can download the binary, place it anywhere on your system, and start using it without complex installation procedures or worrying about Python dependencies. This feature is invaluable for CI/CD pipelines and distributing self-contained environments.
<B>ROOT PREFIX VS. ENVIRONMENT PREFIX</B>
micromamba manages a 'root prefix' (defaulting to ~/.micromamba or $MAMBA_ROOT_PREFIX) where it stores its configuration, package cache, and all managed environments. Individual environments are then created within this root prefix at their 'environment prefix' path. Understanding this distinction is crucial for managing your micromamba installation and environments effectively.
HISTORY
micromamba emerged from the conda-forge ecosystem as a C++ re-implementation of mamba's core functionalities. Its development, primarily by Wolf Vollprecht and the Quansight team, was driven by the need for a truly standalone, minimal, and performant package manager. The goal was to provide conda's powerful environment and package management capabilities in a single, easily distributable binary, suitable for contexts where Python dependencies or larger footprints of conda/mamba were undesirable. It quickly gained traction for its speed and efficiency, especially in CI/CD, containerization, and data science workflows.
SEE ALSO
conda(1), mamba(1), pip(1), virtualenv(1)