Skip to content

Resolve system variables in the defaultInterpreterPath entry #18351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kimadeline opened this issue Jan 24, 2022 · 2 comments
Closed

Resolve system variables in the defaultInterpreterPath entry #18351

kimadeline opened this issue Jan 24, 2022 · 2 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@kimadeline
Copy link

Issue from #18207, fixed by #18215

@kimadeline kimadeline added bug Issue identified by VS Code Team member as probable bug needs PR area-environments Features relating to handling interpreter environments verification-needed Verification of issue is requested labels Jan 24, 2022
@kimadeline kimadeline added this to the January 2022 milestone Jan 24, 2022
@kimadeline kimadeline self-assigned this Jan 24, 2022
@kimadeline
Copy link
Author

kimadeline commented Jan 25, 2022

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)

@rchiodo rchiodo added the verified Verification succeeded label Jan 26, 2022
@rchiodo
Copy link

rchiodo commented Jan 26, 2022

/verified

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants