CI Failure: Build - python3-venv missing #30

Closed
opened 2026-02-24 10:39:11 -08:00 by ci · 2 comments
Owner

CI Failure Report

Workflow: Merge pull request 'Fix PEP 668 compliance for bloc installation' (#29)
Commit: d08e2e5
Run: https://git.brads.house/commune/sandbox/actions/runs/47

Triage Analysis

Error:

The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package.

Root Cause:
PR #29 attempted to fix PEP 668 compliance by installing bloc into a virtual environment instead of using --system. However, the base Debian image does not include the python3-venv package, which is required to create virtual environments.

Failing Dockerfile command:
RUN python3 -m venv /opt/venv && . /opt/venv/bin/activate && uv pip install git+https://git.brads.house/commune/bloc

Recommendation

@brad - Add python3.11-venv to the apt-get install line in the Dockerfile, or use --break-system-packages flag instead of virtual environment.

Note: PR #29 is already merged to main, so the main branch currently has a broken build.

## CI Failure Report **Workflow:** Merge pull request 'Fix PEP 668 compliance for bloc installation' (#29) **Commit:** d08e2e5 **Run:** https://git.brads.house/commune/sandbox/actions/runs/47 ## Triage Analysis **Error:** The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package. **Root Cause:** PR #29 attempted to fix PEP 668 compliance by installing bloc into a virtual environment instead of using --system. However, the base Debian image does not include the python3-venv package, which is required to create virtual environments. **Failing Dockerfile command:** RUN python3 -m venv /opt/venv && . /opt/venv/bin/activate && uv pip install git+https://git.brads.house/commune/bloc ## Recommendation @brad - Add python3.11-venv to the apt-get install line in the Dockerfile, or use --break-system-packages flag instead of virtual environment. **Note:** PR #29 is already merged to main, so the main branch currently has a broken build.
Owner

@agent lets fix this once and for all. we've tried 3 different approaches all have failed. do better.

@agent lets fix this once and for all. we've tried 3 different approaches all have failed. do better.
Owner

Analysis: Why the Previous 3 Attempts Failed

The root cause was missed every time: On Debian/Ubuntu, the venv module is NOT included in the base python3 package — it requires a separate python3-venv package.

What Went Wrong

  1. PR #26 (add-bloc-cli): Used uv tool install approach — didn't address venv at all
  2. PR #28 (fix-bloc-sandbox-user): Attempted system-wide install with --break-system-packages — still didn't fix the underlying issue
  3. PR #29 (fix-pep668-bloc-install): Switched to venv approach to comply with PEP 668, but forgot to install python3-venv package

The error message was explicit:

ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package.

The Fix

PR #31 adds python3-venv to the initial apt-get install list alongside python3 and python3-pip.

This is the correct fix because:

  • Directly addresses the error message
  • Installs the package BEFORE attempting venv creation
  • Follows Debian packaging conventions (separate -venv package)
  • Minimal change, no side effects

See PR #31 for the one-line fix.

## Analysis: Why the Previous 3 Attempts Failed **The root cause was missed every time**: On Debian/Ubuntu, the `venv` module is NOT included in the base `python3` package — it requires a separate `python3-venv` package. ### What Went Wrong 1. **PR #26** (add-bloc-cli): Used `uv tool install` approach — didn't address venv at all 2. **PR #28** (fix-bloc-sandbox-user): Attempted system-wide install with `--break-system-packages` — still didn't fix the underlying issue 3. **PR #29** (fix-pep668-bloc-install): Switched to venv approach to comply with PEP 668, but **forgot to install python3-venv package** The error message was explicit: > `ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package.` ### The Fix **PR #31** adds `python3-venv` to the initial apt-get install list alongside `python3` and `python3-pip`. This is the correct fix because: - ✅ Directly addresses the error message - ✅ Installs the package BEFORE attempting venv creation - ✅ Follows Debian packaging conventions (separate -venv package) - ✅ Minimal change, no side effects See PR #31 for the one-line fix.
brad closed this issue 2026-02-24 10:45:34 -08:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
commune/sandbox#30
No description provided.