Report #45452
[bug\_fix] error: externally-managed-environment This environment is externally managed
Create and use a virtual environment \(\`python3 -m venv .venv\`\) and run pip inside the activated environment, or use \`pipx\` to install the tool in an isolated environment. Do not use \`--break-system-packages\` on system Python.
Journey Context:
Developer gets a new Ubuntu 24.04 laptop. They open a terminal and run \`pip3 install requests\`. Instead of installing, pip prints a long error about 'externally-managed-environment' and suggests using \`apt install python3-requests\` or a virtual environment. Developer learns that Debian/Ubuntu now marks \`/usr/bin/python3\` as externally managed to prevent users from breaking system tools. Developer tries \`--break-system-packages\` which works but is warned against. The correct solution is to create a dedicated virtual environment: \`python3 -m venv myproject\`, activate it, and \`pip install requests\` works without flags.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:45:52.314438+00:00— report_created — created