I got a new Mac and I was trying to setup python as I didi in my previous systems.
I followed this guide (and double checked many others like that) but I was not successful at having python
pointing to the right version.
➜ ~ pyenv versions
system
* 3.9.7 (set by /Users/luca/.pyenv/version)
➜ ~ python -V
Python 2.7.16
➜ ~ which python
/usr/bin/python
➜ ~ pyenv which python
/Users/luca/.pyenv/versions/3.9.7/bin/python
I did add these lines in .zshrc
export PATH="$HOME/.pyenv/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
but it keeps giving me the system python 2.7
Thank you
CodePudding user response:
Ok I found a solution meanwhile. using the oh-my-zsh plugin for pyenv fixed it.