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

Environment activation is strange #22626

Closed
joaomoreno opened this issue Dec 11, 2023 · 5 comments
Closed

Environment activation is strange #22626

joaomoreno opened this issue Dec 11, 2023 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@joaomoreno
Copy link
Member

  1. Create an empty folder
  2. Inside, create a virtual environment: python3 -m venv .venv
  3. Open it with VS Code
  4. Install the Python extension
  5. Open a Terminal

🐛 The virtual environment won't be detected. It seems that it will only be detected once I open a Python file. And even then...

🐛 ... sometimes the following dialog shows up:

image

Is this even necessary? Feels like a very strange message to see as a user. If the environment was correctly applied, should we not find a better way to tell the user that it was indeed applied, instead of telling them "trust us"?

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Dec 11, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 11, 2023
@karrtikr
Copy link

Feels like a very strange message to see as a user. If the environment was correctly applied, should we not find a better way to tell the user that it was indeed applied, instead of telling them "trust us"?

Indeed, we explored many different ways of letting the user know and eventually decided to show the prompt, you can following the discussion thread here: microsoft/vscode#188969 (comment). cc/ @Tyriar

Traditionally, terminal prompts are generally used to indicate whether a Python env is currently activated in terminal:

image

Unfortunately Python extension itself doesn't have access to change that in powershell, hence we show a notification.

If one clicks "Learn more", it indicates how users can double check whether their environment was activated: https://github.com/microsoft/vscode-python/wiki/Activate-Environments-in-Terminal-Using-Environment-Variables.

🐛 The virtual environment won't be detected. It seems that it will only be detected once I open a Python file. And even then...

If only show the currently selected Python environment, if a Python file is opened, to avoid cluttering the status bar, it should still be detected but we just don't show it.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Dec 11, 2023
@matkozak
Copy link

For the past few days, I am seeing the message but the opposite to what it says is happening. The prompt indicates that the environment is active - but it's not. Definitely feels like a regression in the last release.

@karrtikr
Copy link

@matkozak Please open up a new issue regarding that and we'll look into it asap.

@joaomoreno
Copy link
Member Author

@karrtikr I see the info-needed label, but it's not clear to me what additional information you need here.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Dec 13, 2023
@karrtikr
Copy link

karrtikr commented Feb 1, 2024

I was looking for suggestions, based on my comment above #22626 (comment), Python extensions seems restricted at the moment as this is limitation imposed from VS Code. Closing in favor of #22723 where we could come up with sets of feature requests from VS Code to solve the issue.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Feb 1, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug 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

3 participants