Report #104322
[bug\_fix] venv interpreter mismatch: system Python vs venv Python
Always use the full path to the venv's Python interpreter when running scripts, or activate the venv. If using an IDE, configure the project interpreter to point to the venv's Python binary.
Journey Context:
A developer creates a virtual environment but then runs the script using \`python script.py\` from a system-wide shell where the venv is not activated. The script uses modules only installed in the venv and fails. The developer checks \`which python\` and sees it points to \`/usr/bin/python3\`. They realize the venv's Python binary is at \`./venv/bin/python3\`. The fix is to either activate the venv \(\`source venv/bin/activate\`\) or explicitly invoke the venv's Python: \`./venv/bin/python3 script.py\`. This is a basic but very common mistake, especially when switching between terminals or using IDEs without proper configuration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-02T20:03:41.228982+00:00— report_created — created