Skip to content

Use .python-version to select python interpreter #22744

Closed as not planned
Closed as not planned
@tekumara

Description

@tekumara

pyenv uses a .python-version file when selecting the python version. It would be super nice if the workspace Python Interpreter selection would use .python-version to select the appropriate pyenv version on a system with pyenv.

Current behaviour

  1. If python.defaultInterpreterPath is set, this will be the workspace's python interpreter when opening a workspace containing a .python-version file, rather than the version specified in .python-version which might differ.
  2. When opening a terminal, if the selected python interpreter is a pyenv intrepreter, the pyenvActivationProvider will run pyenv shell to set the terminal to the workspace's python interpreter. This may differ from the version in .python-version. This conflicts with the behaviour of pyenv in a non-vscode terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions