I created some new aliases in my .bashrc file and did

source ~/.bashrc

Now, everytime I open my terminal it always comes with the (base)

How do I remove that?


That's the "base" environment from Anaconda or Miniconda. It means the Python environment from conda is enabled by default.

There're two solutions.

  1. Just disable the base environment, make sure your conda >= 4.6. Whenever you wanna use Python, enable an environment from conda manually with following command,

    # run this in an interactive shell
    # enable environment called "base", the default env from conda
    conda activate base
    # deactivate an environment
    conda deactivate
  2. Enable the base environment, which is the default behavior of conda, but don't modify your prompt. Run the following command in an interactive shell once.

    conda config --set changeps1 false
  • Are you suggesting to add the two lines in point 1 in bashrc ? – ankii Oct 6 '19 at 12:07
  • Cool! that worked. Thanks! – Agam Kashyap Oct 6 '19 at 12:09
  • @ankii Sorry, I didn't make it clear. The solution No.1 in the hyperlink should be set in .bashrc. The commands activate/deactivate an environment should be run in an interactive shell. – Simba Oct 6 '19 at 12:33
  • But every time one opens terminal, it would be annoying to enter these commands? I've added some lines in my bashrc profile as per this answer apple.stackexchange.com/questions/367313/… For saving me the trouble. One such command(in my file) also brings up which git branch is active. – ankii Oct 6 '19 at 12:34
  • @ankii The solution one is to DISABLE activating the "base" environment, which means make the Python executable from "base" unavailable. – Simba Oct 6 '19 at 12:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .