Skip to content

Unable to set python interpreter when workspace not trusted, but also no trust popup #1774

Open

Description

I teach in a data science program, and over the past two weeks have had to work with ~60 students on environment management, and I have to say it's been more painful this year than ever before.

One major issue I kept finding is students would try to change their default interpreter (or active interpreter) to a working miniforge3 installation, and the change just wouldn't stick. No error messages, no popups, nothing. The change would appear in the user settings JSON, but Python wouldn't respect it and would just stick to using the os-bundled version of Python.

I did eventually figure out I could get around this by:

  • In VS Code, use open folder to open the student's user directory.
  • This would cause a "trust this workspace?" bar to pop up.
  • If I clicked manage and trust, then I would regain the ability to select interpreters.

This happened on mac and windows, and all with new installs done during the past two week or so.

If this is a desired behavior (I don't really get what "trusted workspace" is trying to protect), then it shouldn't be a silent failure — there should be an informative popup with instructions on correcting the problem.

If it isn't desired, it should definitely be fixed — it's really hurting the onboarding process for new users.

Activity

  1. eleanorjboyd commented on Sep 24, 2026

    @eleanorjboyd
    Contributor

    🤖 Thanks for reporting this; a silent failure when choosing an interpreter is especially confusing during onboarding. To distinguish expected Restricted Mode behavior from a bug in the notification/selection flow, could you share your VS Code, Python, and Python Environments extension versions, whether python.useEnvironmentsExtension is enabled, the exact interpreter-selection action you use, and the Python Environments output when selection fails? Does the same action work immediately after trusting the same folder?

  2. added
    bugIssue identified by VS Code Team member as probable bug
    info-neededIssue requires more information from poster
    and removed on Sep 24, 2026
  3. nickeubank commented on Sep 24, 2026

    @nickeubank
    Author

    Hi robot!

    As noted above, this occurred one some dozen different student computers. The students had all first installed miniforge, then they got a clean install of vs code, installed:

    • The Python extension bundle from Microsoft (something like 100m installations),
    • The Jupyter extension bundle from Microsoft, and
    • The Black Formatter extension from Microsoft.

    Then would start to try (and fail) to set default python interpreter.

  4. eleanorjboyd commented on Sep 24, 2026

    @eleanorjboyd
    Contributor

    sorry- had I a more detailed followup but that got auto-replied, my apologies. So our "untrusted" flow will show up because these extensions do not work in an untrusted workspace. But if a user has no folder open, we haven't presented the trust dialog yet since there is no workspace to trust or untrust and then if a student tries to do the "select interpreter" or "change interpreter" the trust is in limbo. I am wondering if this may be the case. Do you have users open a workspace before the "change interpreter"?

  5. nickeubank commented on Sep 24, 2026

    @nickeubank
    Author

    That became my workaround.

    The concern is that opening vs code and creating a new file (without opening a directory) is not an unusual workflow, and in the case the failure is silent and inexplicable.

  6. eleanorjboyd commented on Sep 24, 2026

    @eleanorjboyd
    Contributor

    yes very true- let me look into a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugtriage-needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions