Every time I open the terminal in my Mac, I get the error /etc/zshrc:7: command not found: locale .
when I type "printf '%s\n' $path" i get:
/condabin
"/opt/homebrew/bin
/opt/homebrew/sbin${PATH+
$PATH}";
It is possible that I have somehow totally messed up .zshrc and .zprofile in my system. also the .bash_profile dont even exist in my system
here are the content of these two files:
zprofile:
# Setting PATH for Python 3.9
# The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATHeval $(/opt/homebrew/bin/brew shellenv)
zhrc:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/saman/miniforge3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/saman/miniforge3/etc/profile.d/conda.sh" ]; then
        . "/Users/saman/miniforge3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/saman/miniforge3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
please help me as i am totally helpless and lost not knowing what any of these files do. There may be other threads that somewhat touch on this topic, but they have not messed up their paths the way i did i guess. thank you so much in advance
In my case the problem the install of Visual Studio Code which added the line:
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
to .bash_profile and .zprofile files.
The correct line is:
export PATH="$PATH":"/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
PS: I was misreading the manual instructions from Visual Studio Code on macOS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With