Report #100055
[bug\_fix] venv accidentally created with system Python instead of the intended interpreter, causing packages or syntax to mismatch
Create the venv by explicitly invoking the target interpreter: \`/path/to/python3.11 -m venv .venv\`. Delete and recreate the venv if it was made with the wrong interpreter. Verify with \`.venv/bin/python --version\` before installing packages. Do not rely on \`python3 -m venv\` if \`python3\` is ambiguous.
Journey Context:
A developer runs \`python3 -m venv .venv\` on a machine where \`python3\` is the OS-managed Python 3.9, but their project requires 3.11 which lives at \`/usr/local/bin/python3.11\`. After activating \`.venv/bin/activate\`, \`python --version\` still reports 3.9. They install packages that appear to work, but when a teammate using 3.11 runs the code it fails on \`match\` syntax or \`tomllib\` usage. The rabbit hole includes checking \`which python\`, reading the shebang in \`.venv/bin/pip\`, and realizing the venv was bootstrapped from the wrong executable. The fix works because a venv is a lightweight copy/symlink of the interpreter used to create it; it does not auto-upgrade or switch later.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:34:48.870000+00:00— report_created — created