CategoriesUncategorized

Install pyenv on MacOS

For Python in macOS, use pyenv:

brew install pyenv

To install a specific Python version, run:

pyenv install <version>

To select a version for every command run with the current folder:

pyenv local 3.5.0

Note that you must update PATH in your environment to find pyenv’s python3 before any other:

PATH="~/.pyenv/shims:${PATH}"

To list available versions:

pyenv versions

See https://gist.github.com/Bouke/11261620 for more information.

Leave a Reply

Your email address will not be published. Required fields are marked *