Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
pyenv lets you easily switch between multiple versions of Python.
It’s simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.
Install pyenv¶
:::bash
curl https://pyenv.run | bashUsage¶
Install a specific version of Python.
:::bash pyenv install 3.7.8Use a specific version of Python.
:::bash pyenv local 3.7.8Uninstall a specific version of Python
:::bash pyenv uninstall 3.7.8
Tips & Traps¶
Precedence of versions of Python are defined in
$HOME/.pyenv/version. Place the version of Python that you want to use in the first line of the file.The root directory of pyenv is controled by the environment variable
$PYENV_ROOT. You can report the root directory of pyenv by running the commandpyenv root.
References¶
https://
https://
https://
https://