Skip to content

Reactivating Terminal #24699

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

Open
karthiknadig opened this issue Jan 8, 2025 · 7 comments
Open

Reactivating Terminal #24699

karthiknadig opened this issue Jan 8, 2025 · 7 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority needs spike Label for issues that need investigation before they can be worked on.
Milestone

Comments

@karthiknadig
Copy link
Member

When activating python extension, you see "Reactivating Terminal" in the status bar, and it does not go away.

Workaround:

  • Add the following to your User settings.json, and Reload VS Code:
    "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]
  • If that does not resolve the issue, try running this command from the command palette: Python: Clear cache and reload.
  • If that does not resolve the issue, try setting python.locator to js.
@karthiknadig karthiknadig added area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs spike Label for issues that need investigation before they can be worked on. labels Jan 8, 2025
@karthiknadig karthiknadig self-assigned this Jan 8, 2025
@karthiknadig karthiknadig pinned this issue Jan 8, 2025
@karthiknadig karthiknadig marked this as a duplicate of microsoft/vscode#237108 Jan 8, 2025
@karthiknadig karthiknadig marked this as a duplicate of microsoft/vscode#237091 Jan 8, 2025
@karthiknadig karthiknadig marked this as a duplicate of microsoft/vscode#237132 Jan 8, 2025
@karthiknadig karthiknadig marked this as a duplicate of microsoft/vscode#237634 Jan 10, 2025
@karthiknadig karthiknadig marked this as a duplicate of #24744 Jan 27, 2025
@RMvirtual
Copy link

Your workaround does technically get the "Reactivating terminals" loop to stop, but it does not solve the problem of the Python extension failing to be used.

@karthiknadig karthiknadig added the important Issue identified as high-priority label Jan 31, 2025
@karthiknadig karthiknadig added this to the February 2025 milestone Jan 31, 2025
@karthiknadig
Copy link
Member Author

@RMvirtual Please create a new bug and provide details on what is happening. Include logs from Output > Python, and Output > Python Locator. Include your settings as well.

@LukeLIN-web
Copy link

LukeLIN-web commented Feb 5, 2025

Same problem, my python extension cannot work
I tried

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

This workaround does technically get the "Reactivating terminals" loop to stop, but it does not solve the problem of the Python extension failing to be used.

How to setting python.locator to js? I find it in setting dashboard.

Good, setting python.locator to js solve my problem, I can reset my env now.

@aantora
Copy link

aantora commented Feb 6, 2025

Hello can you please elaborate on the "

  • Add the following to your User settings.json, and Reload VS Code:

    "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]
    " part? I don't know how to do this, I am a new coder. Thank you.

@karthiknadig
Copy link
Member Author

@aantora You can use the settings UI to find that:

Image

Click on the link that says "edit in settings.json", paste the above line at the end:

Image

As for the python.locator you can find it in settings as well:

Image

@tommyvct
Copy link

tommyvct commented May 21, 2025

This problem, however on macOS, does not appear to be happening as frequently as on Windows.

Maybe it have something to do with the difference with zsh and pwsh.

@KuRRe8
Copy link

KuRRe8 commented May 27, 2025

Thanks! It really works. Before the solution, the python locator finds "C:\Program Files\Python39\python.exe" and failed for every new python file. That path is unavailable for many years on my computer, and I tried my best to clean up registry, vscode user database, vscode settings ... but no effect. My mistake was that I didn't immediately remember to come to the official repo issue to search for relative threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority needs spike Label for issues that need investigation before they can be worked on.
Projects
None yet
Development

No branches or pull requests

6 participants