Report #55107
[bug\_fix] ModuleNotFoundError in VS Code terminal despite pip install success \(venv interpreter mismatch\)
Explicitly select the virtual environment interpreter in VS Code \(Command Palette: Python: Select Interpreter\) and verify the terminal shows the venv path in the prompt. If not, manually activate with \`source .venv/bin/activate\` \(Linux/Mac\) or \`.venv\\Scripts\\Activate.ps1\` \(Windows\). Ensure \`python.terminal.activateEnvironment\` is true in VS Code settings.
Journey Context:
Developer creates \`.venv\` using \`python -m venv .venv\` in project root. VS Code detects it and shows in status bar. Developer opens integrated terminal, sees prompt shows \`\(.venv\)\`. They run \`pip install requests\`, see success. They run \`python -c "import requests"\` and get ModuleNotFoundError. They check \`which python\` and see \`/usr/bin/python\` instead of \`.venv/bin/python\`. Realizes the terminal prompt was misleading; the activate script didn't modify PATH correctly due to shell configuration, or they ran \`deactivate\` earlier in that session. They reload VS Code window, select interpreter explicitly, new terminal works.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:59:22.045045+00:00— report_created — created