Skip to content

Poetry ignores pyenv local Python when "Python Environments" VS Code extension is active #743

@enricostragiotti

Description

@enricostragiotti

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

  1. Activate the Python Environments extension in VS Code.
  2. 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.
  3. 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!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions