You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to set python interpreter when workspace not trusted, but also no trust popup #1774
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.
🤖 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?
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.
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"?
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.
Activity
eleanorjboyd commentedon Sep 24, 2026
🤖 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.useEnvironmentsExtensionis 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?nickeubank commentedon Sep 24, 2026
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:
Then would start to try (and fail) to set default python interpreter.
eleanorjboyd commentedon Sep 24, 2026
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"?
nickeubank commentedon Sep 24, 2026
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.
eleanorjboyd commentedon Sep 24, 2026
yes very true- let me look into a fix