Skip to content

Manually selected interpreter path does not appear in environment manager until refresh #1918

Description

Bug: manually selected interpreter does not appear in environment manager until refresh

When I add/select a virtual environment by entering its interpreter path via Python: Select Interpreter, VS Code switches to that interpreter correctly, but the Python Environments / project environment manager UI can still show the previously selected environment until I manually refresh the environment list.

Repro steps

  1. Have a project with multiple virtual environments, for example:

    • .venv-1
    • .venv-2
  2. Use Python: Select Interpreter.

  3. Choose Enter interpreter path... and select:

    /Users/eleanorboyd/vscode-repos/evald/.venv-1/bin/python
    
  4. Confirm the selected/copied interpreter path shows the new environment, for example:

    /Users/eleanorboyd/vscode-repos/evald/.venv-1/bin/python
    
  5. Open the Python Environments / project environment manager UI and click the eye/details icon.

Actual behavior

The active interpreter path appears to be updated to .venv-1, but the environment manager UI/details can still navigate to or display the previously selected .venv-2 environment. After clicking refresh for environments, .venv-1 appears and the UI updates correctly.

Expected behavior

After selecting an interpreter by explicit path, the environment manager should either:

  • immediately include that environment in the environment manager list, or
  • automatically trigger environment discovery/refresh for that selected interpreter path, so the UI/details icon does not remain stale or point at the previous environment.

Notes

This looks like a discovery/cache synchronization issue: selecting the interpreter by path updates the active interpreter, but the environment manager list does not reflect the newly selected environment until a manual refresh.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions