~ 1 min read
Getting Poetry to use the active Pyenv to Create a Virtual Environment
I found with a new poetry install that it refused to use the pyenv version of Python.
I needed to explicitly tell Poetry where to find the active pyenv:
poetry env use -- $(which python)
After this, it works as expected.
Source: https://github.com/python-poetry/poetry/issues/651#issuecomment-861421651