Mamba Basics
mamba
is a package manager for Python. It is a reimplementation of conda
in C++. The syntax is the same as conda
, but it is much faster. It is recommended to use mamba
instead of conda
for package management.
It is recommended to create a new environment for each project and leave the base environment untouched.
In the following, we assume the environment name is cs101
.
Uninstall Anaconda/miniconda
See Uninstalling Anaconda for more details.
Install Mambaforge
See Mambaforge for more details.
For Linux and macOS:
|
|
For Windows:
Download the installer from Mambaforge and run it.
Enable the options to “Create start menu shortcuts” and “Add Miniforge3 to my PATH environment variable”.
Open a miniforge Prompt
from Start Menu. Now Try:
|
|
Prevent mamba
from activating the base environment automatically
|
|
Add Mambaforge to VS Code
Add the following lines to settings.json
:
|
|
Create a New Environment
|
|
Activate an Environment
|
|
Install common packages for scientific computing
|
|
Use pip
to install packages not available in Anaconda
|
|
Install local modules/packages
|
|
In this way, the package will be installed in the current environment and the changes will be reflected immediately.
Deactivate an Environment
|
|
List All Environments
|
|
Remove an Environment
|
|