4

I have conda with two environments working, I have installed "conda_nb" and since I did it, the word "(base)" appears always in my prompt, I discovered that I can remove for a session using conda deactivate.

enter image description here

I found a similar question but it is not exactly the same problem since I've tried all the possible solutions from there, but none of those worked for me. Therefore the origin of this problem is not exactly the same.

Deleting conda_nb didn't work for me, nor change lines of .bashrc that I post here:

# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/home/pablo/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/home/pablo/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/pablo/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/home/pablo/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

pd: in .profile there is no information about conda. und in anacnoda3/profile.d i didn't find nothing useful (but maybe there is).

Kulfy
  • 18,154

2 Answers2

3

I had the same issue this morning and did some sleuthing. I updated conda last night, and when I ran the initialization script, it added similar code to my .bash_profile file. The code runs the script generated by conda shell.bash hook. The last line of this script is conda activate base, which adds (base) to the beginning of your prompt (and modifies some environment variables like your path). You can override this by adding the following command to your .condarc file.

auto_activate_base: false

One possible issue with not auto-activating the base environment is the conda initialization script does not add your base/bin directory to your path if you do not activate the base environment. I already add it to my path in my .bash_profile, so it is not an issue for me.

2

After installing conda you can type the following command:

conda config --set auto_activate_base false

Restart your terminal and problem solved.

4ndt3s
  • 301
  • 2
  • 5