Reputation: 18177
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?
Upvotes: 8
Views: 6996
Reputation: 3117
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)
Upvotes: 3