I wonder if this is all a PATH issue. I have MacBook Pro 12.6, with homebrew. No pyenv or virtualenv. (perhaps I should..) I am using nvim.
When I start iterm it launches python to the python command prompt rather than my zsh prompt. When I ctrl D
it goes straight to the zshell prompt with no complaints.
Last login: Sun Oct 23 10:07:06 on ttys001
/etc/zshrc:7: command not found: locale
Python 3.9.6 (default, Sep 19 2022, 18:46:30)
[Clang 14.0.0 (clang-1400.0.29.201)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
My /etc/paths is
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
My .zshenv is
export PATH=/Users/np/.local/bin:$PATH
My .zsh_profile is
export PATH="$PATH:/usr/bin"
export PATH="$PATH:/usr/sbin"
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PATH=/opt/homebrew/bin:$PATH
PATH=/.local/bin:$PATH
PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
#clipboard
set clipboard=unnamed
#oh-my-zsh
export ZSH="$HOME/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
#Theme
ZSH_THEME="powerlevel10k/powerlevel10k"
#Plugins
plugins=(git zsh-autosuggestions z )
source $ZSH/oh-my-zsh.sh
#/opt/homebrew/etc/profile.d/z.sh
#aliases
source ~/.zsh_aliases
#P10k
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
source /Users/np/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"```
I know the PATH entries are a mess.
I don't know how to fix the PATHS and dont have a clear idea of the priorities and orders for PATHS if indeed that is the issue. I know that my path to homebrew should be loaded first so that the system uses homebrew links before system links.
I think this is something to do with my multiple pythons and I need advice on wihich to delete, - presumably all except the homebrew and native mac ones as I mainly use homebrew.
Here is
Which -a python
/opt/homebrew/bin/python3
/usr/bin/python3
/usr/local/bin/python3
/opt/homebrew/bin/python3
/usr/local/bin/python3
/opt/homebrew/bin/python3
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
/usr/bin/python3