tldr/pages/common/pyenv.md

29 lines
673 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`
- 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}}`