Skip to content

TPI: Pipenv support #776

@eleanorjboyd

Description

@eleanorjboyd

Refs: #686

Complexity: 4

Author: @eleanorjboyd

Create Issue


The goal of this TPI is to test the new support for pipenv virtual environment management in the python environments extension

setup:

  • install the python environments extension if you haven't already (make sure it is on the pre-release version
  • add python.useEnvironmentsExtension: true to your user settings
  • install pipenv on your device https://pipenv.pypa.io/en/latest/installation.html

test steps:

  • create a new virtual environment with pipenv, do so by:
    • opening a new project (folder)
    • running pipenv install pytest this will create a new env and install the pytest package in it
  • go to the "python" tab in the sidebar (has the python logo)
  • click reload on your environment managers
Image
  • verify you can see the environment you created with pipenv and that pipenv shows up on your list of environment managers
  • click the dropdown on the environment and verify you see pytest listed as an installed package

steps to confirm all actions (buttons) for terminal work:

Image
  • hover over the pipenv env listed to see the path of the environment. You will then use this path in next steps to confirm that the correct environment (that one) is activated / used in the following actions
  • click terminal icon to "Create python terminal", now verify this terminal is activated correctly by calling which python or where python and confirming it is the env you created
  • click to pkg icon to "install a package", select one of your choosing, verify it gets installed without issue (should show in the dropdown on the environment)
  • click the checkmark to "set as project environment"
  • create a python file, put the following contents in it, click the play button dropdown and select "debug file"
  • verify the script outputs the correct environment you saw in earlier steps
import sys

print("python sys.executable:", sys.executable)
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions