Select pyenv environment based on folder .python-version file · Issue #1167 · microsoft/vscode-python (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@dan-blanchard

Description

@dan-blanchard

Environment data

Actual behavior

You have to manually select the pyenv interpreter for each workspace folder.

Expected behavior

It should detect the workspace pyenv interpreter based on the .python-version file present in the workspace folder root.

For example, every folder I have added to my workspace has a .python-version file that pyenv creates when you run pyenv local NAME_OF_VENV in that folder. The file contains a single string which is the name of the folder/symlink in ~/.pyenv/versions/ that should be used.