Skip to content

Instantly share code, notes, and snippets.

@akashchandwani
Last active August 23, 2024 17:28
Show Gist options
  • Save akashchandwani/ecc4b9607a822fcc135ff16e1433122a to your computer and use it in GitHub Desktop.
Save akashchandwani/ecc4b9607a822fcc135ff16e1433122a to your computer and use it in GitHub Desktop.
Python Version Manager - pyenv

Pyenv

pyenv is a python environment manager which helps in maintaining and using different version of python on your machine.

To check the current installation of Python

which python

To check the version of python

python -V

Installation

brew update
brew install pyenv

To use a specific version of python globally

pyenv install 3.10
pyenv global 3.10

To use a specific version of python in a directory

pyenv local 3.10

To view list of python versions available to isntall:

pyenv install -l

To update pyenv, run

brew upgrade pyenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment