Mamba: Difference between revisions
From Stat DS Computing Wiki
No edit summary |
No edit summary |
||
| Line 66: | Line 66: | ||
== Maintenance and Configuration == | == Maintenance and Configuration == | ||
Commands to view mamba configuration and clean system resources. | Commands to view mamba configuration and clean system resources. | ||
{| class="wikitable" | |||
|+ | |||
!Command | |||
!Purpose | |||
!Example | |||
|- | |||
|mamba clean | |||
|Removes unused packages, caches, and tarballs to free up disk space. Use this frequently! | |||
|mamba clean --all | |||
|- | |||
|mamba config list | |||
|Shows the entire Mamba configuration. | |||
|mamba config list | |||
|- | |||
|mamba config sources | |||
|Shows the location of all configuration files (.condarc). | |||
|mamba config sources | |||
|} | |||
Revision as of 16:19, 6 October 2025
Mamba is the new alternative to Conda. It functions similarly and is preinstalled on all Statistics & Data Science servers.
Installed at...
/opt/miniforge3/bin/mamba
Creating an Environment
1. Create a new Python environment by logging into a server and running the "create" command.
mamba create -n testenv1 python=3.112. Activate the environment.
mamba activate testenv13. Install packages to the environment.
mamba install pandasPackage Management
Useful package management commands.
| Command | Purpose | Example |
|---|---|---|
| mamba install | Installs one or more packages into the current active environment. | mamba install numpy pandas |
| mamba update | Updates a specific package in the current environment. | mamba update numpy |
| mamba update --all | Updates all packages in the current environment. | mamba update --all |
| mamba remove | Removes a package from the current environment. | mamba remove numpy pandas |
| mamba list | Lists all installed packages in the current active environment. | mamba list |
| mamba search | Searches for available packages on Mamba's configured channels. | mamba search tensorflow |
Other Useful Commands
List all environments.
mamba env listMaintenance and Configuration
Commands to view mamba configuration and clean system resources.
| Command | Purpose | Example |
|---|---|---|
| mamba clean | Removes unused packages, caches, and tarballs to free up disk space. Use this frequently! | mamba clean --all |
| mamba config list | Shows the entire Mamba configuration. | mamba config list |
| mamba config sources | Shows the location of all configuration files (.condarc). | mamba config sources |