Skip to content

Pipenv not activated using "pipenv shell" #10611

@ddaspit

Description

@ddaspit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-terminalbugIssue identified by VS Code Team member as probable bugneeds proposalNeed to make some design decisionsverifiedVerification succeeded

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions