2

Im trying to switch to python 2.715. I do:

pyenv versions

I see:

  system
* 2.7.15 (set by /Users/me/.pyenv/version)
  3.7.2
  3.7.2/envs/env_name
  3.8.0
  env_name

I then do:

python --version

Yet I get the result:

Python 3.9.7

How can I switch to python 2.7.15?

1
  • 2
    It seems you have to use pyenv local 2.7.15. I saw the info here and hope is right Commented May 20, 2022 at 19:20

1 Answer 1

2

You need to add the shim to your system PATH

Edit your .bashrc or .zshrc, and add

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi

Worth pointing out that Python2 is EOL, and you really shouldn't be using it.

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

Comments

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.