Use direnv
to automatically activate a mamba environment. Assumes that micromamba executable is in the $PATH. The contents of .direnvrc
goes in either ~/.direnvrc
or ~/direnv/direnvrc
.
Tested with bash
and fish
shells.
Requires .envrc
file in the directory where mamba is to be activated and should contain:
layout mamba [environment-name]
- If
environment-name
is supplied thenenvironment-name
is activated. - If
environment-name
is not supplied andenvironment.yml
exists and containsname:
then the environment specified is activated. - If
environment-name
is not supplied andenvironment.yml
does not exist or exists but does not containname:
then thebase
environment is activated.