What is Pyenv?
When you got multiple python projects at hand that use different python versions, uninstall and reinstall between them makes your python environment a mess.
With pyenv, a Python version management tool, can let developers easily manage, install and switch between python versions.
Installation
pyenv only work on UNIX/MacOS systems, the alternative on Windows is pyenv-win
You can install using homebrew
| |
Set Up Shell Environment
You should be able to check your shell enviornment with this command: echo $SHELL, then execute the following command accordingly
ZSH
| |
Refer to this for detail setup on fish shell or bash
Restart your shell to let the settings take effect
| |
You can execute pyenv init - to check whether it works, this should output some command-like lines.
Install Python with Pyenv
| |
Setting Global and Local Version
| |