NUR ARIF
NUR ARIF

Reputation: 1

Variable path issue : conda command not found

After installing Anaconda correctly. I wanted after finishing the installation to do the following. I forget to do it while installing anaconda:

I added at the end of file

export PATH="/root/anaconda3/bin"

but I still get

conda --version conda command not found

Upvotes: 0

Views: 142

Answers (1)

Carlos Gonçalves
Carlos Gonçalves

Reputation: 86

If you use ZSH or another Unix shell, copy to your .zshrc

__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup

Upvotes: 0

Related Questions