Python environments
Pyenv
See all installed and available versions
pyenv versions
To list all installation options that are available to us.
pyenv install -l | grep \ \ 3
The \ \ 3
gives me only the version 3 ones. The output contains two spaces
on each line, hence the escaped spaces \ \
.
To install a version, just run
pyenv install <full-version>
To set the local python version for the current directory, run:
pyenv local 3.11.1
This will create/update a .python-version
file in the current directory.