How To Install Pyenv In MacOS?
Install pyenv
-
macOS
brew install pyenv
Click to copy
Switch between multiple versions of Python easily.
How to use pyenv?
Below are few example commands for pyenv that you can use in the terminal.
List all available commands:pyenv commands
Click to copyList all Python versions under the ${PYENV_ROOT}/versions directory:pyenv versions
Click to copyInstall a Python version under the ${PYENV_ROOT}/versions directory:pyenv install 2.7.10
Click to copyUninstall a Python version under the ${PYENV_ROOT}/versions directory:pyenv uninstall 2.7.10
Click to copySet Python version to be used globally in the current machine:pyenv global 2.7.10
Click to copySet Python version to be used in the current directory and all directories below it:pyenv local 2.7.10
Click to copy
Install the latest version of pyenv in macOS from terminal. To install the pyenv just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of pyenv from the respository and install it in your computer/server.