0

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

1 Answers1

1

Ok I found a solution meanwhile. using the oh-my-zsh plugin for pyenv fixed it.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 23 '21 at 00:54
  • Can you explain it in details? – Dragos Neata Sep 23 '21 at 08:08