Skip to content

Resolve system variables in the defaultInterpreterPath entry #18351

Closed

Description

Issue from #18207, fixed by #18215

Activity

  1. kimadeline commented on Jan 25, 2022

    @kimadeline
    Author

    Repro steps:

    • Have a workspace with Python files and a .code-workspace file
    • Create a subfolder in the workspace, and then create a virtual environment in that subfolder (any flavor of Python 3 works): cd subfolder; python3 -m venv .venv
    • Add the following to the .code-workspace file:
    {
        "settings": {
            "python.defaultInterpreterPath": "${workspaceFolder}/path/to/python.exe",
        }
    }

    On windows the path to the python executable will be something like ${workspaceFolder}/<folder>/.venv/Scripts/python.exe, while on Unix it will be ${workspaceFolder}/<folder>/.venv/bin/python.exe

    • Open the workspace and activate the extension
    • Run the Select Interpreter command, and verify that the path in the Use Python from 'python.defaultInterpreterPath' setting entry is a valid path that contains no system variables
    • Select that entry, and verify that it is a usable Python interpreter (the extension works, and operations like linting or formatting work)
  2. rchiodo commented on Jan 26, 2022

    @rchiodo

    /verified

  3. locked as resolved and limited conversation to collaborators on Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions