2

I stored my conda environments in a folder called conda_envs and I created there an environment called my_env. In order to avoid having the full path printed as part of my prompt, I create a .condarc file with the instruction:

env_prompt: ({name})

Everything works well except for one annoying detail. As expected, when I log into my account I get a prompt like:

(base) dir$

And my environments are also listed as expected:

base      *  /SomeWhere/Miniconda3/4.7.12.1
my_env       /SomeWhereElse/conda_envs/my_env

But after activating and deactivating my_env, my prompt becomes:

(4.7.12.1) dir$

How could I get back to my original prompt?

(base) dir$
JDS
  • 103
  • 6
  • 2
    Does this answer your question? [Anaconda environment bash prefix too long](https://stackoverflow.com/questions/56619347/anaconda-environment-bash-prefix-too-long) – merv Jun 16 '21 at 18:56
  • Yes, this was it but I needed to introduce a small correction: ```conda config --set env_prompt '($(basename {default_env})) ' ``` – JDS Jun 18 '21 at 13:55

0 Answers0