Search code examples
anacondacondaenvironment

How to add an alias name for the default anaconda ?


As the following picture shows, my default Anaconda environment(anaconda3)have no name.

What's more, I'd love to set the Anaconda3 as my default python environment.

I also find this in my ~/.bashrc document.

# added by Anaconda3 4.4.0 installer
export PATH="/home/cine/anaconda3/bin:$PATH"

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/cine/anaconda2/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/cine/anaconda2/etc/profile.d/conda.sh" ]; then
        . "/home/cine/anaconda2/etc/profile.d/conda.sh"
    else
        export PATH="/home/cine/anaconda2/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

How to do ?


Solution

  • you have to include PATH variable in the default .rc file. An easy fix is just to add

    export PATH="/home/username/anaconda3/bin:$PATH"
    

    to your ~/.profile file. Then source the file by running

    source ~/.profile
    

    in a terminal.

    Verify that it works by running

    which python
    

    You should see /home/username/anaconda3/bin/python