Step 1: Check your python version use poetry to create an env which is equal to the installed python version. The version running on your machine will be used by poetry(Windows). Others can try with the documentation code for mac I guess.
python --version
If this returns 3.9 the same will be installed by poetry.
poetry env use python
For Mac:
pyenv install 3.9.8
pyenv local 3.9.8 # Activate Python 3.9 for the current project