Description
When the Python Environments extension in VS Code is active, poetry install does not respect the Python version set by pyenv local. Instead, it defaults to the version of Python that was used to install Poetry itself.
Steps to reproduce
- Activate the Python Environments extension in VS Code.
- In a project folder, run:
pyenv local 3.13.5
poetry install
poetry env info
It shows the Python version used to install Poetry, not the pyenv local version.
- Disable the Python Environments extension and repeat the steps. Poetry now correctly uses the pyenv local Python.
Environment
Windows 11
pyenv-win 3.x
Poetry 2.x (installed with pipx)
VS Code with Python Environments extension
Let me know if you can reproduce the issue!