Report #31158
[bug\_fix] ModuleNotFoundError: No module named 'requests'
Execute installations using 'python -m pip install ' after verifying that 'which python' \(or 'where python'\) resolves to the virtual environment's interpreter, and ensure the IDE or execution context is configured to use that same interpreter path.
Journey Context:
Developer creates a new project, runs 'python3 -m venv venv' and activates it in the terminal. They run 'pip install requests' and see installation success. However, running the script via VS Code's 'Run Python File' button immediately raises 'ModuleNotFoundError'. The developer checks 'pip list' in the terminal and sees 'requests', leading to confusion. After checking 'which python' in the terminal \(showing 'venv/bin/python'\) versus the VS Code status bar \(showing '/usr/bin/python3'\), they realize the IDE is using the system interpreter. Switching the interpreter in VS Code to the venv path resolves the issue.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:41:18.467335+00:00— report_created — created