-
Notifications
You must be signed in to change notification settings - Fork 1.2k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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 #12011
Comments
It would also fix a broken pipenv activation if you move your project. |
We've confirmed this issue, thanks. Although the activation works fine for me, it's better to use That being said, what if there're multiple pipenv environments in |
Yes. |
@JakubBlaha The problem I see with this is that, technically, there can multiple pipenv environments a workspace folder can select. For instance, Workspace folder Suppose for So the logic will not be as straightforward as simply sending Although I think in most cases, users only use one pipenv environment per workspace, but we can never know. |
@karrtikr As from my understanding, pipenv is intended to be used with a single virtual environment and does not support creating multiple environments for a single workspace. Pipenv would refuse to create multiple environments for a single project. If a user needs to have multiple environments assigned to a single workspace, then it isn't smart to use pipenv at all, venv should be rather used. |
I understand. I was talking about what a user is technically allowed to do. He could use pipenv environment created for some other workspace as interpreter for this one.
You'll be surprised at what our 40M userbase can attempt to do ;) |
I understand now. I guess there should be an option of whether to use the current method of environment activation, which may be faster or the more reliable option, the |
Perhaps #8870 could also help as a workaround. Please upvote, helps bump the priority. |
Should be fixed along with #12020, but let's keep this open until then. |
@JakubBlaha Actually I found out we have had some issues with using Perhaps we can use |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Environment data
python.languageServer
setting: MicrosoftExpected behaviour
When opening a new git bash terminal, the pipenv environment is properly activated.
Actual behaviour
jakub@LAPTOP-6R3A0N4R MINGW64 /d/Fiverr_28 (master) $ source C:/Users/jakub/.virtualenvs/Fiverr_28-MrJNCoYT/Scripts/activate (Fiverr_28)
which does not activate the environment properly in GitBash
Steps to reproduce:
What I suggest
Pipenv provides a really useful layer of abstraction and one of it's features is the
pipenv shell
command, which is not being used in this case. Using this command instead of directly running the activation script would resolve this issue.The issue #2559 would also be resolved by using
pipenv shell
instead of directly activating the venv.The text was updated successfully, but these errors were encountered: