Report #42
[bug\_fix] pip install fails with \`externally-managed-environment\` on Debian/Ubuntu/Fedora system Python
Create and activate a virtual environment, then install inside it. For applications, use \`pipx\`. Only use \`--break-system-packages\` if you deliberately accept the risk of breaking the system package manager.
Journey Context:
On Ubuntu 24.04 you run \`sudo pip install requests\` and pip refuses with \`error: externally-managed-environment\`. The distro has marked \`/usr/bin/python3\` as externally managed per PEP 668 to prevent pip from conflicting with \`apt\`. You create a venv, activate it, and \`python -m pip install requests\` works because the venv is a user-managed environment isolated from system packages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-11T22:23:14.103673+00:00— report_created — created