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

Pipenv not activated using "pipenv shell" #10611

Closed
ddaspit opened this issue Mar 17, 2020 · 5 comments
Closed

Pipenv not activated using "pipenv shell" #10611

ddaspit opened this issue Mar 17, 2020 · 5 comments
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions verified Verification succeeded
Milestone

Comments

@ddaspit
Copy link

ddaspit commented Mar 17, 2020

Environment data

  • VS Code version: 1.43.0
  • Extension version (available under the Extensions sidebar): 2020.2.64397
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
  • Relevant/affected Python packages and their versions: pipenv 2018.11.26
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): Jedi
  • Value of the python.languageServer setting: Microsoft

Expected behaviour

When opening a terminal in a project with a pipenv environment selected, the environment should be activated using pipenv shell. This seems to be indicated as the expected behavior by the resolution of issue #2855.

Actual behaviour

The pipenv environment is activated using <pipenv dir>/Scripts/activate.ps1. This causes the .env file to not be loaded.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Create a new directory.
  2. In a terminal, navigate to the new directory and create a pipenv environment using pipenv shell.
  3. Open VS Code on the new directory.
  4. Create a new python file in the directory, so the Python extension is loaded.
  5. Ensure that the correct pipenv environment is selected.
  6. Open a new terminal in VS Code.
  7. Observe that the environment is activated using <pipenv dir>/Scripts/activate.ps1 and not pipenv shell.
@ddaspit ddaspit added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Mar 17, 2020
@bherbruck
Copy link

I am having the same issue in Windows with venv. None of my venvs are activating or being recognized by vscode. Maybe due to a powershell update I got today.

@karthiknadig karthiknadig self-assigned this Mar 17, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 17, 2020
@mixja
Copy link

mixja commented Mar 28, 2020

This issue also applies on MacOS and is very annoying.

There seems be a history of this feature being implemented but then being reverted.

@DonJayamanne
Copy link

@karthiknadig @luabud
Fyi #4394, #4203

@karthiknadig karthiknadig added investigating We are looking into the cause of the issue and removed triage labels Sep 15, 2020
@karthiknadig karthiknadig added area-terminal needs proposal Need to make some design decisions and removed investigating We are looking into the cause of the issue labels Oct 14, 2021
@karthiknadig karthiknadig removed their assignment Oct 14, 2021
@karrtikr
Copy link

Handle #4203 if and when bringing pipenv shell back.

@karrtikr
Copy link

Closing in favor of #16988

@karrtikr karrtikr added this to the October 2021 milestone Oct 22, 2021
@karrtikr karrtikr added the verified Verification succeeded label Oct 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants