Report #104321
[bug\_fix] pip install --user in a virtual environment
Never use \`pip install --user\` inside a virtual environment. Remove the flag and let pip install into the venv. If the package is already installed globally, consider using \`pip install --ignore-installed\` or \`pip install --upgrade\` within the venv.
Journey Context:
A developer, accustomed to installing packages globally, runs \`pip install --user somepackage\` while their virtual environment is active. The package gets installed in the user site-packages directory, not the venv. When they run the script from the venv, the package is not found because the venv's site-packages are searched first. The developer spends time checking sys.path and eventually realizes the --user flag overrides the venv. The fix is to simply remove \`--user\` when inside a venv, ensuring the package is installed in the venv. This is a common pitfall for developers transitioning from system Python to virtual environments.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-02T20:03:36.863317+00:00— report_created — created