2019-02-24 15:47:41 +00:00
|
|
|
# pyenv
|
2016-08-09 08:38:21 +01:00
|
|
|
|
|
|
|
> Switch between multiple versions of Python easily.
|
2024-01-09 09:04:06 +00:00
|
|
|
> See also: `asdf`.
|
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`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- List all Python versions under the `${PYENV_ROOT}/versions` directory:
|
2016-08-09 08:38:21 +01:00
|
|
|
|
|
|
|
`pyenv versions`
|
|
|
|
|
2022-08-10 11:57:12 +01:00
|
|
|
- List all Python versions that can be installed from upstream:
|
|
|
|
|
|
|
|
`pyenv install --list`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Install a Python version under the `${PYENV_ROOT}/versions` directory:
|
2016-08-09 08:38:21 +01:00
|
|
|
|
|
|
|
`pyenv install {{2.7.10}}`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- 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}}`
|