Skip to content

Select Python 3.11+ interpreter in install-dev.sh#47

Open
ZeshiWu wants to merge 1 commit into
mode-io:mainfrom
ZeshiWu:fix-install-dev-python-version
Open

Select Python 3.11+ interpreter in install-dev.sh#47
ZeshiWu wants to merge 1 commit into
mode-io:mainfrom
ZeshiWu:fix-install-dev-python-version

Conversation

@ZeshiWu

@ZeshiWu ZeshiWu commented Jun 23, 2026

Copy link
Copy Markdown

Problem

scripts/install-dev.sh used the bare python3 to create the venv. On a machine where python3 resolves to an older interpreter (e.g. 3.9), pip silently filters out dependency versions that require 3.10+ and fails:

ERROR: Could not find a version that satisfies the requirement fastapi<0.136,>=0.135
ERROR: No matching distribution found for fastapi<0.136,>=0.135

The project requires Python 3.11+, but the script gave no hint that the interpreter was the root cause.

Fix

  • Probe for the first interpreter that satisfies Python 3.11+ (python3.14 → 3.13 → 3.12 → 3.11 → python3).
  • Fail fast with a clear message if none is found, instead of building a broken venv.
  • Upgrade pip inside the fresh venv so newer wheel metadata resolves correctly.

Validation

bash scripts/test_backend.sh   # 117 passed
npm test                       # 244 passed
npm run build                  # ok

Also dry-ran the interpreter-selection logic (picks a 3.11+ interpreter) and re-ran a full local install to confirm dependencies install cleanly.

🤖 Generated with Claude Code

The bare `python3` may resolve to an older interpreter (e.g. 3.9) that
silently picks up incompatible dependency versions. Probe for a 3.11+
interpreter, fail with a clear message if none is found, and upgrade pip
in the fresh venv so newer wheel metadata resolves correctly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant