Skip to content

Test microvenv #21100

@karthiknadig

Description

@karthiknadig

Refs: #20905

Complexity: 3

Create Issue


Requirements

You need a linux flavor derived from debian. Check the following before testing:

  1. Your apt package list should not have venv (python3-venv) or pip (python3-pip). You can test this by running python3 -c "import venv" or python3 -c "import pip". Both should fail.
  2. Make sure you have python 3.7 or greater

The intent of this TPI is to make sure we use microvenv (shipped with python extension) as fallback when venv is not present. It should create a simplified version of the environment and should also install pip into the environment. To verify this correctly, you must ensure that the OS you are using does not contain venv or pip pre-installed. For debian based OS these are often installed via apt, and they don't ship with them out of the box.

Verification

  1. Ensure you have python extension pre-release installed.
  2. Open a folder with python file.
  3. With the python that you were going to use to create environment, run these (both should fail) <python-path> -c "import venv" and <python-path> -c "import pip".
  4. Use the create environment command (Python: Create environment)
  5. Select venv, and go through the flow.
  6. Select the python binary which you used above.
  7. After it is done, you should be able to install using pip, from the terminal in VS Code run: .venv/bin/python -m pip install pytest.

Notes

  1. For this TPI, we only care to see if env is created and pip is installed in the env. If you got an error while installing using pip that may not be related. Do report them here and I will let you know.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions