Pyenv Operatons: Difference between revisions
Jump to navigation
Jump to search
Line 36: | Line 36: | ||
pyenv install -l | pyenv install -l | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==<tt>shell</tt>== | |||
Selects a <code>pyenv</code>-installed Python version for the current shell session: | |||
<syntaxhighlight lang='bash'> | |||
pyenv shell 3.9.9 | |||
</syntaxhighlight> | |||
==<tt>local</tt>== | |||
==<tt>global</tt>== |
Revision as of 00:54, 3 November 2023
Internal
Installation
brew install pyenv
You need to setup your shell after installation.
Setup Shell
Bash
Add this to .bashrc
:
# pyenv setup
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"
Commands
install
Installs a new Python version:
pyenv install 3.9.9
To understand what happens, see:
List of Available Python Versions
pyenv install -l
shell
Selects a pyenv
-installed Python version for the current shell session:
pyenv shell 3.9.9