1. Version Management
    1. View versions
    2. Install a version
    3. Set a global/local version
    4. Spawn Shell with Given Version
    5. Uninstall a Version
  2. Environment Management
    1. List Virtualenvs
    2. Create a New Virtualenv
    3. Remove a Virtualenv
    4. (Conda) Activate a Virtualenv

Version Management

View versions

pyenv versions

Install a version

pyenv install 3.7.3

Set a global/local version

pyenv [global/local] 3.7.3

Spawn Shell with Given Version

pyenv shell 3.7.3

Uninstall a Version

pyenv uninstall 3.7.3

Environment Management

List Virtualenvs

pyenv virtualenvs

Create a New Virtualenv

pyenv virtualenv 3.7.3 my-virtualenv-3.7.3

Remove a Virtualenv

pyenv uninstall my-virtualenv-3.7.3

(Conda) Activate a Virtualenv

Although pyenv-virtualenv is supposed to play nicely with conda, I’ve found it easier to use conda create as usual.

pyenv activate my-conda-env-5.2