-
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
Pipenv environment is not activated using pipenv shell #16988
Comments
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 5 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. |
👍🏼 |
Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future. We do encourage people to continue 👍 this issue as it helps us prioritize our work based on what the community seems to want the most. |
Hi there, just dropped by and wanted you to know I am in the same situation, pipenv shell is not called even if it's identified by VScode. I hope you can get it to work together, Thanks a lot! |
I think a good way to go about this would be to just provide a setting to indicate how the virtual environment should be loaded/activated e.g. a dropdown to pick from "activate.ps1", "pipenv shell", etc. This gives the freedom to use what you need, but can also give that safety net if auto-detection fails. |
What is the reason for wanting I'm using ZSH on Linux. and my venv is being activated via the Calling The only thing the If GitBash doesn't support modifying Edit: Actually, I can give you a strong guess about what's wrong...The I suppose that But VSCode cannot use Perhaps pipenv can tweak the generation of My heart goes out to you Windows developers. :P You may wanna just get WSL to run VSCode inside that instead. I hear it can run GUI apps these days. Or install Linux. I recommend Fedora, it's clean, stable and easy to use and is the distro chosen by Linus Torvalds and his whole family. It's a joy to use. |
My issues/reason is when using PowerShell and OhMyPosh, I have the venv info before the prompt and also within the OhMyPosh prompt as well. Either way works to activate under windows with debugging, it's just the prefix to the prompt that is annoying and cannot be fixed. |
@adam4813 Hmm, so if you run the current Python extension (which uses the The reason why you get a dual prompt is that the Edit: Another idea may be to see if your can turn off "display venv name" in your OhMyPosh configuration to avoid the dual names that way. |
vscode-python/src/client/common/terminal/environmentActivationProviders/pipEnvActivationProvider.ts Line 54 in 1186432
pipenv shell at this point, so closing as fixed.
|
@brettcannon The code is there but actually it is disabled in the line above: vscode-python/src/client/common/terminal/environmentActivationProviders/pipEnvActivationProvider.ts Lines 27 to 29 in 1186432
So we end up not using |
We have a new activation mechanism #11039 which does not require executing any script, give it a try:
Btw note, Python extension does not support Gitbash currently. |
Make sure to handle #4203 and #4245 if and when bringing
pipenv shell
back.Potential solution:
Use new VSC API (proposed API at the time of writing this) to check what information has been written out into terminal before sending other commands.
See here microsoft/vscode#67693 (comment)
The text was updated successfully, but these errors were encountered: