Mamba: Difference between revisions

From Stat DS Computing Wiki
Jacobg2 (talk | contribs)
Jacobg2 (talk | contribs)
Line 6: Line 6:
Create a new Python environment.
Create a new Python environment.


# Log into a server and run the "create" command.
1. Log into a server and run the "create" command.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
mamba create -n testenv1 python=3.11
mamba create -n testenv1 python=3.11
</syntaxhighlight>
</syntaxhighlight>


## Activate the environment.
2. Activate the environment.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
mamba activate testenv1
mamba activate testenv1
</syntaxhighlight>
</syntaxhighlight>


# Install packages to the environment.
3. Install packages to the environment.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
mamba install pandas
mamba install pandas
</syntaxhighlight>
</syntaxhighlight>


# List all environments.
4. List all environments.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
mamba env list
mamba env list
</syntaxhighlight>
</syntaxhighlight>

Revision as of 13:56, 6 October 2025

Mamba is the new alternative to Conda. It functions similarly and is preinstalled on all Statistics & Data Science servers.


Creating an Environment

Create a new Python environment.

1. Log into a server and run the "create" command.

mamba create -n testenv1 python=3.11

2. Activate the environment.

mamba activate testenv1

3. Install packages to the environment.

mamba install pandas

4. List all environments.

mamba env list