From c23ac092f68ff9e4279a1cf5533c68667f10d884 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Tue, 1 Oct 2024 15:13:02 +0100 Subject: [PATCH] chore(.zshrc): comment out the export PATH line added by conda initialize to prevent conflicts with anaconda setup --- .zshrc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 718f5d3..6186a48 100644 --- a/.zshrc +++ b/.zshrc @@ -259,7 +259,7 @@ PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"; export PERL_MM_OPT; ## Setup anaconda -export PATH="/opt/homebrew/anaconda3/bin:$PATH" +# export PATH="/opt/homebrew/anaconda3/bin:$PATH" # commented out by conda initialize #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! export SDKMAN_DIR="$HOME/.sdkman" @@ -270,3 +270,19 @@ export STARSHIP_CONFIG="$HOME/.config/starship.toml" eval "$(starship init zsh)" + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/opt/homebrew/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" ]; then + . "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" + else + export PATH="/opt/homebrew/anaconda3/bin:$PATH" + fi +fi +unset __conda_setup +# <<< conda initialize <<< +