I need to use python 3.8. I installed it using the following command:
pyenv install 3.8.1
Now the output of pyenv versions is:
system
* 3.8.1 (set by /Users/username/.pyenv/version)
Output of python -V:
Python 2.7.16
Why are they different?
Try eval "$(pyenv init --path)". That worked for me.
I had the exact same issue after installing oh-my-zsh. What solved it for me was:
Add pyenv to the plugins list on .zshrc:
plugins=(git pyenv)
Almost at the top of the file, just under these lines:
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
I added these lines:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
And then I relaunched the terminal and everything was fine! (that is, the python version was the same)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With