-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Version
Extension: 1.16.0
vscode:
Version: 1.108.0
Commit: 94e8ae2b28cb5cc932b86e1070569c4463565c37
Date: 2026-01-08T13:53:10.781Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Linux x64 6.14.0-37-generic (Ubuntu 24.04)
Description
When opening a Python file outside of the current workspace folder, VS Code assigns it the system/default Python interpreter, even though a workspace-specific virtual environment is already selected and remains correctly applied to all files within the workspace. The workspace interpreter cannot be selected for the external file due to a conflicting state message.
Uninstalling the python extension fixed the problem.
Steps to Reproduce
- Open VS Code with a workspace folder.
- Select a workspace-specific Python virtual environment.
- Verify that Python files inside the workspace use the selected interpreter.
- Open a Python file located outside the workspace folder tree.
- Observe that the external file is assigned the system/default Python interpreter.
- Attempt to select the workspace virtual environment for the external file.
Actual Behavior
- Python files inside the workspace continue to use the correct interpreter.
- The Python file outside the workspace uses the system/default interpreter.
- Attempting to select the workspace virtual environment for the external file results in the message:
"<workspace-venv> (<python version>)" is already selected as the environment for: "<workspace>"
- As a result, the external file cannot be associated with the workspace virtual environment, even though it is not currently using it.
Expected Behavior
External Python files should be able to explicitly use the active workspace interpreter.