-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Windows] extension overwrites PATH, preventing virtual environment usage #609
Comments
@mcrumiller You might be running into this issue microsoft/vscode-python#24810 |
Thanks @karthiknadig, this did indeed resolve the issue after reloading VS Code. All of my coworkers have encountered this problem as well, and it's a bit nefarious because it looks like the virtual environment is activated (the console shows the |
@mcrumiller We are getting rid of that experiment because of the problems like the ones you faced. The thing that we wanted to achieve was avoid sending a command to the terminal to activate. The reason is potential collision with user typing in the terminal, other extensions attempting to send things to terminal, debugger not getting the right terminal because debugger command ran before the terminal activation etc. This experiment was supposed to address that. Unfortunately, the solution was not ideal. We attempt to run the activation script in a "sandbox" like mode and extract the environment changes. These changes however are acquired for the default terminal shell. This is where the problem starts. We now have to merge these changes with all the other shell environment variables. It does not do it right, sometimes it is not possible to do it right. It can also sometimes cause a problem where terminals get stuck in "reactivating" mode. We are working on a different approach. This is the tracking issue for fixing the problem: microsoft/vscode-python#24699 |
Since the no-config debugging update, my local venv python instances are not accessible via the terminal unless I explicitly activate the environment. I open a new terminal, and it appears my environment is activated, but it's not:
However, my virtual environment is not available:
If I manually activate, I then see the local instance on the path:
This is also visible with an
ECHO %PATH%
from the console.When I run
Terminal: Show Environment Contributions
, I see the following:The PATH command above is probably overwriting the path and removing the local environment path.
The text was updated successfully, but these errors were encountered: