Report #104426
[bug\_fix] ModuleNotFoundError: No module named 'requests'
Activate the virtual environment before running the script: \`source venv/bin/activate\` \(Linux/macOS\) or \`venv\\Scripts\\activate\` \(Windows\). If already activated, reinstall the package inside the venv using \`python -m pip install requests\`.
Journey Context:
Developer created a virtual environment, installed requests with \`pip install requests\`, but running the script gave ModuleNotFoundError. They checked \`pip list\` and saw requests listed, but still got the error. After hours of debugging, they discovered they were running the script with the system Python interpreter \(e.g., \`/usr/bin/python3\`\) instead of the venv's Python \(e.g., \`./venv/bin/python\`\). The venv was activated in the shell, but the IDE or terminal had a different Python path cached. The fix: explicitly using \`python -m pip install\` ensures the correct pip for the active interpreter, and verifying the interpreter path with \`which python\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-16T20:06:09.921272+00:00— report_created — created