Skip to contents

This function installs [micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html), a lightweight `conda`-compatible package manager, into a user-defined directory. It automatically detects the operating system and architecture, downloads the appropriate binary, and extracts it into the specified location.

Usage

sn_install_micromamba(
  install_dir = "~/.local/bin",
  version = "latest",
  overwrite = FALSE
)

Arguments

install_dir

Character. The directory where `micromamba` should be installed. Default is `~/.local/bin`.

version

Character. The version of micromamba to install. Use `"latest"` (default) for the latest stable version.

overwrite

Logical. If `TRUE`, forces reinstallation even if `micromamba` is already installed. Default is `FALSE`.

Value

A character string: the full path to the installed `micromamba` binary.

Details

If `micromamba` is already installed at the target location, and `overwrite = FALSE`, the existing binary is reused.

The function sets the `SN_MICROMAMBA` environment variable to the installed binary path, so that other ShennongTools functions can access it automatically.

Examples

if (FALSE) { # \dontrun{
# Install micromamba to the default location
sn_install_micromamba()

# Force reinstall micromamba
sn_install_micromamba(overwrite = TRUE)

# Install a specific version
sn_install_micromamba(version = "1.5.6")
} # }