I installed pyenv using Homebrew (package management tool) on mac os and set the python version to global, but the python version does not switch.
$ brew install pyenv #Install pyenv
$ pyenv install 3.8.0 #Install python version
$ pyenv global 3.8.0 #Set python version to global
$ python -V #Check version
2.7.7 #Problems that are the same as the default version
Add eval "$ (pyenv init-)" to .bash_profile
or .zshrc
in your home directory and adapt with the source
command.
$ vim .zshrc
$ source .zshrc
Recommended Posts