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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

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.
Can you explain it in details?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.