If not already installed, install Python. The recommended way is to use pyenv, which allows multiple parallel Python installations which can be automatically selected per project you're working on.
# Install Python if necessary
pyenv install 3.8.13
pyenv local 3.8.13
If not already installed, get Poetry according to https://python-poetry.org/docs/#installation. If your are new to Poetry, you may find https://python-poetry.org/docs/basic-usage/ interesting.
# Create venv and install all dependencies
poetry env use 3.8
poetry install
# add pre-commit hooks
poetry run pre-commit install
# load the environment variables (see section Environment Variables below)
source env.sh