tldr/pages/common/pyenv.md

33 lines
762 B
Markdown
Raw Normal View History

# pyenv
2016-08-09 08:38:21 +01:00
> Switch between multiple versions of Python easily.
2019-05-29 14:53:58 +01:00
> More information: <https://github.com/pyenv/pyenv>.
2016-08-09 08:38:21 +01:00
- List all available commands:
`pyenv commands`
- List all Python versions under the `${PYENV_ROOT}/versions` directory:
2016-08-09 08:38:21 +01:00
`pyenv versions`
- List all Python versions that can be installed from upstream:
`pyenv install --list`
- Install a Python version under the `${PYENV_ROOT}/versions` directory:
2016-08-09 08:38:21 +01:00
`pyenv install {{2.7.10}}`
- Uninstall a Python version under the `${PYENV_ROOT}/versions` directory:
2016-08-09 08:38:21 +01:00
`pyenv uninstall {{2.7.10}}`
- Set Python version to be used globally in the current machine:
`pyenv global {{2.7.10}}`
- Set Python version to be used in the current directory and all directories below it:
`pyenv local {{2.7.10}}`