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

The following extensions want to relaunch the terminal to contribute to its environment #24822

Open
mecrayavcin opened this issue Feb 8, 2025 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@mecrayavcin
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.97.0 (Lastest Version)
  • OS Version: Windows_NT x64 10.0.26100

Image

Steps to Reproduce:

  1. I have anaconda and created 3 env. base, tutorialEnv and playwright.
    In default, Vscode Terminal: Activate Envionment is True so when i get new terminal, my base conda environment is activated,
    But when i try to change env in the same terminal via CTRL + SHIFT + P , new selected environment is never activated in the same terminal and pwsh terminal icon turns to yellow!

"The following extensions want to relaunch the terminal to contribute to its environment"

I want Vscode to activate each environment whatever i select, activate it in the same terminal.
In the pas there was not such a problem.

Could you please fix it in the next update?
Is there any way to fix this?

Thanks

@eleanorjboyd eleanorjboyd transferred this issue from microsoft/vscode Feb 14, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 14, 2025
@karthiknadig
Copy link
Member

@mecrayavcin Try adding this to your user settings, then re-load VS Code.

"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Feb 14, 2025
@sharpau
Copy link

sharpau commented Feb 14, 2025

I have similar symptoms. The thing I was looking into is that with the Python extension enabled, my terminals all start in AppData instead of the workspace. If I disable Python, they start in the workspace. I also see terminals requesting to restart to activate Python (and if I tell them to, it doesn't work).

I added the user setting above and it solves this problem.

@djalan
Copy link

djalan commented Feb 18, 2025

@mecrayavcin Try adding this to your user settings, then re-load VS Code.

"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]

I am only using one venv and I have a similar error message on every vscode startup. I tried the above solution, but it didn't work.
It's already activated, but Python still wants to relaunch the terminal?

Image

Version: 1.97.2 (user setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

6 participants