https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html
https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html
https://micro.mamba.pm/api/micromamba/win-64/latest
https://prefix.dev/docs/mamba/overview
With mamba, it’s easy to set up software environments
. A software environment is simply a set of different libraries, applications and their dependencies. The power of environments is that they can co-exist: you can easily have an environment called py27 for Python 2.7 and one called py310 for Python 3.10, so that multiple of your projects with different requirements have their dedicated environments. This is similar to “containers” and images. However, mamba makes it easy to add, update or remove software from the environments.

Download the latest executable from https://micro.mamba.pm/api/micromamba/win-64/latest
You can install it or just run the executable to create a python environment under Windows:
micromamba.exe create -n myenv python=3.10
This will create a myenv allocation under:
C:\Users\<USERNAME>\AppData\Roaming\mamba\envs\myenv
Once the environment is created, activate it with:
// FROM THE FOLDER WHERE THE micromamba.exe lives
set MAMBA_ROOT_PREFIX=%APPDATA%\mamba
micromamba.exe shell init --shell cmd.exe --root-prefix %MAMBA_ROOT_PREFIX%
// AND FROM A NEW SHELL
micromamba activate myenv
Or to execute a single command in this environment, use:
micromamba run -n myenv mycommand
NOTE if you get an error such as:
critical libmamba Shell not initialized
'micromamba' is running as a subprocess and can't modify the parent shell.
Thus you must initialize your shell before using activate and deactivate.
The error means your shell hasn’t been hooked for Micromamba activation, so micromamba activate
can’t modify the parent cmd.exe
process.
To solve this:
1- set an environment variable for mamba to point to where the install is, ie:
setx MAMBA_ROOT_PREFIX "H:\AppData\Roaming\mamba"
This may not be needed, but to check if your full install worked, from a command prompt enter:
set
You will likely see something like:
MAMBA_BAT=C:\Users\<USER_NAME>.local\share\mamba\condabin\micromamba.bat
MAMBA_EXE=C:\SOFTWARE\MicroMamba\Library\bin\micromamba.exe
These are defined by your micromamba.bat install under:
C:\Users\<USER_NAME>\.local\share\mamba\condabin
Inside this file, there is a pointer to where micromamba is running from:
@REM Copyright (C) 2012 Anaconda, Inc
@REM SPDX-License-Identifier: BSD-3-Clause
@REM Replaced by mamba executable with the MAMBA_EXE and MAMBA_ROOT_PREFIX variable pointing
@REM to the correct locations.
@SET "MAMBA_EXE=M:\SOFTWARE\MicroMamba\Library\bin\micromamba.exe"
@SET "MAMBA_ROOT_PREFIX=C:\Users\YOURNAME\.local\share\mamba"
@IF [%1]==[activate] "%~dp0_micromamba_activate" %*
@IF [%1]==[deactivate] "%~dp0_micromamba_activate" %*
@CALL "%MAMBA_EXE%" %*
@IF %errorlevel% NEQ 0 EXIT /B %errorlevel%
@IF [%1]==[install] "%~dp0_micromamba_activate" reactivate
@IF [%1]==[update] "%~dp0_micromamba_activate" reactivate
@IF [%1]==[upgrade] "%~dp0_micromamba_activate" reactivate
@IF [%1]==[remove] "%~dp0_micromamba_activate" reactivate
@IF [%1]==[uninstall] "%~dp0_micromamba_activate" reactivate
@IF [%1]==[self-update] @CALL DEL /f %MAMBA_EXE%.bkup
@EXIT /B %errorlevel%
2- start a new shell and activate that env variable:
micromamba shell init --shell cmd.exe
That should allow to run the venv as needed.
To add a Windows shortcut to launching the micromamba environment:
C:\Windows\System32\cmd.exe /K micromamba activate myenv
The taskbar files under windows are located here:
C:\Users\<USER_NAME>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
or
H:\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar