Skip to content
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

Switching interpreter to global in environment manager doesn't deactivate previously activated .venv #60

Open
anthonykim1 opened this issue Dec 3, 2024 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@anthonykim1
Copy link

anthonykim1 commented Dec 3, 2024

Testing microsoft/vscode-python#24503

Video example:

Screen.Recording.2024-12-03.at.12.50.40.PM.mov

Having .venv activated and then switching the environment in the environment manager to non-venv such as python3.13, does not seem to change the terminal state.

When I click the terminal icon next to my workspace name (after switching from venv to non-venv interpreter option), terminal is created with previously activated (now expected to be deactivated but wrongly persists as activated) venv.

In additional to deactivate&activate issues(such as #49) that I have previously created, perhaps shell environment API will also be a key in solving this.

@anthonykim1 anthonykim1 added the bug Issue identified by VS Code Team member as probable bug label Dec 3, 2024
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Dec 4, 2024
@karthiknadig
Copy link
Member

@anthonykim1 Do you have the python extension env variable experiment on? This extension explicitly activates by sending a command to the terminal. If you have the python extension experiment on, then it can lead to activations because the variables were already set.

@karthiknadig
Copy link
Member

When using this extension turn of both of these:
Image

@anthonykim1 anthonykim1 changed the title Switching interpreter to global in environment manager does deactivate previously activated .venv Switching interpreter to global in environment manager doesn't deactivate previously activated .venv Dec 5, 2024
@anthonykim1
Copy link
Author

Good point, I definitely had the terminal env var experiment on and probably one or both of the mentioned setting on as well.
I should remember to turn off all three in future testing. Probably helpful to note it as some of them are defaulted to true and would be easier to track down issues that are only specific to env manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants