Issue
After installing mamba and creating an environment, all the names of my previous conda environments are missing. I can see their path and even activate them if I do:
conda activate /environment/path
this is what it looks like when I do:
conda env list
output:
conda environments:
base * /home/emalv/mambaforge3
moose /home/emalv/mambaforge3/envs/moose
/home/emalv/miniconda3
/home/emalv/opt/miniconda3
/home/emalv/opt/miniconda3/envs/ase
/home/emalv/opt/miniconda3/envs/deepmd
/home/emalv/opt/miniconda3/envs/env_soap
/home/emalv/opt/miniconda3/envs/moose
/home/emalv/opt/miniconda3/envs/pfmod
/home/emalv/opt/miniconda3/envs/pmg
/home/emalv/opt/miniconda3/envs/pycalphad-garces
I tried to activate my environment called "pycalphad-garces" but it didn't work using the standard:
conda activate pycalphad-garces
got this: output:
EnvironmentNameNotFound: Could not find conda environment: pycalphad-garces
You can list all discoverable environments with `conda info --envs`.
I would expect to get the environment activated. I could activate this environment by doing:
conda activate /home/emalv/opt/miniconda3/envs/pycalphad-garces
This is how my .bashrc looks like this regarding conda initialization:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/emalv/mambaforge3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/emalv/mambaforge3/etc/profile.d/conda.sh" ]; then
. "/home/emalv/mambaforge3/etc/profile.d/conda.sh"
else
export PATH="/home/emalv/mambaforge3/bin:$PATH"
fi
fi
unset __conda_setup
if [ -f "/home/emalv/mambaforge3/etc/profile.d/mamba.sh" ]; then
. "/home/emalv/mambaforge3/etc/profile.d/mamba.sh"
fi
# <<< conda initialize <<<
Any suggestion how to get the names back and be able to activate using them?
Thanks folks
Solution
You need to point the system to the existing environments, in my case "/Users/fk/miniconda3/envs/". Try running this:
conda config --append envs_dirs /Users/fk/miniconda3/envs/
Afterwards both mamba and conda can be used to activate the envs.
Answered By - felix Answer Checked By - Timothy Miller (WPSolving Admin)