3 homepage: https://github.com/pyenv/pyenv
5 pyenv: Simple Python Version Management
8 To update run `pyenv update`.
10 ### How to Install pyenv on macOS
12 Make sure that you already have Xcode tools installed:
15 xcode-select --install
18 ### How to Install pyenv on Linux
20 Make sure that you already have the necessary build tools installed:
25 sudo apt install -y build-essential zlib1g-dev libssl-dev
28 sudo apt install -y libreadline-dev libbz2-dev libsqlite3-dev
33 > `pyenv` lets you install and switch between different versions of `python` as
34 > the logged in user. It doesn't require admin permissions, and doesn't
35 > interfere with your system version of python.
37 Be sure to **follow the onscreen instructions** after the install (and the
38 pre-requisites above).
40 Here's how you can check for the latest version:
43 pyenv install --list | grep -v -- - | tail -n 1
50 pyenv install -v 3.9.1
51 #> Installed Python-3.9.1 to ~/.pyenv/versions/3.9.1
62 ### List all available python version
82 ### Install Python versions
85 pyenv install <version>
91 List installed versions:
99 Pin an application to a specific Python version:
105 Unset the local version:
111 (setting the version works per-folder)
113 ### List existing virtualenvs
119 ### Create virtualenv
121 From current version with name "venv35":
124 pyenv virtualenv venv35
127 From version 2.7.10 with name "venv27":
130 pyenv virtualenv 2.7.10
134 ### Activate/deactivate
137 pyenv activate <name>
141 ### Delete existing virtualenv
144 pyenv uninstall venv27