天天看點

anaconda rstudio安裝後打不開_Anaconda安裝後設定PATH

在Mac上安裝後,需要将Anaconda的bin路徑設定到PATH中,以zsh為例,将以下内容加到

.zshrc

檔案:

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