I created a virtual environment with poetry as usual by running:
pyenv install 3.9.2
pyenv local 3.9.2
poetry env use 3.9.2
poetry install
poetry shell
I can effectively see a .python-version file where I can read "3.9.2" and python -V successfully returns 3.9.2. The virtual environment is activated too.
Should I delete the .venv folder and recreate the virtual environment. I do not quite understand why I am getting this error. I even ran
poetry add pysqlite3
poetry update