-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Visual Code doesn't seem to re-trigger if a virtual environment is deleted. #18009
Comments
@kayhayen We don't watch the |
That command was executed by me, and then it says "Discovering Python interpreters" when I reload the Window, but the pipenv created virtual is not picked up again ever. I do not understand how it ever became an option in the first place. So checked Python debug log, and it has this: Part of the issue might be this:
The Python I used before, was the Debian Python, and it's a self compiled one now, and I have had problems with virtualenvs before with them. I am to blame for having this:
Virtualenvs create a python binary without |
I have opened #18209 in case us pointing you to the logs might have helped you discover the issue faster. Please upvote if that helps. |
Regarding the autoupdating of version information, #18009 (comment) provides the explanation.
We try our best to do that, but in this case we cache the version info for the current session for performance reasons, so a simple reload should update the version. (using Let me know if you have any other feedback. |
VS Code version
Version: 1.62.1 (user setup) Commit: f4af3cbf5a99787542e2a30fe1fd37cd644cc31f Date: 2021-11-05T10:57:55.946Z Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19043
Extension version
v2021.11.1422169775
OS type
Linux
OS version
Debian Buster WSL
Python distribution
Other
Python version
3.9
Language server
Pylance
Expected behaviour
When I deleted a
virtualenv
withpython3.9 pipenv --rm
it becomes unusable with it. However, in Visual Code, I couldn't get rid of it. I expected it to cease using it, after it became unusable to pipenv.Actual behaviour
Visual Code never ceased to use it, and it never offered me to select the new environment created in the same place, but with a different version. I verified that pipenv was using for that folder this pipenv, but Visual Code was not. Somehow pipenv environment retains information about the old environment.
I deleted
.vscode-server
with no success. I think found that if I delete.local/share/virtualenvs/<name_of_the_folder_as_seen_in_vscode>
the information is gone.Not sure what's going on here, clearly
pipenv --rm
didn't do its job properly, but also Visual Code doesn't detect the multiple Python versions used in that folder, and should have listed both, but it only listed one of them.Steps to reproduce
python3.7 -m pipenv install
with any environment, then open the folder in Visual Code.python3.7 pipenv --rm
and then it is still present, and the one created withpython3.9 -m pipenv install
never shows up.Logs
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: