Skip to content

PIP_REQUIRE_VIRTUALENV - break setup-python action #1285

@sdolender

Description

@sdolender

Description:
PIP_REQUIRE_VIRTUALENV - break setup-python action.
setup-python should consider using --isolated option:
https://pip.pypa.io/en/latest/cli/pip/#cmdoption-isolated

Action version:
setup-python@v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
n/a

Repro steps:
0. Clear ghr _tool dir ( empty caches )

  1. Set PIP_REQUIRE_VIRTUALENV=true on self-hosted runner environment
  2. Use the following workflow step:
    - uses: actions/setup-python@v5
      with:
        python-version: '3.11'
  3. Run the workflow

Expected behavior:
Installed pip packages into local site-packages
<ghr-dir>_work/_tool/Python/3.11.15/x64/lib/python3.11/site-packages

Actual behavior:

  Error: ERROR: Could not find an activated virtualenv (required).
  Error: The process '/usr/bin/bash' failed with exit code 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions