pip install fails with "error: externally-managed-environment".
PEP 668: newer distros forbid pip from trampling the system Python.
python3 -m venv .venv && source .venv/bin/activate && pip install <pkg>pipx install <tool># it works, then breaks apt-managed packagesOne venv per project; system Python stays pristine.
Spinning up a fresh box to reproduce or escape this error?
Managed cloud hostingNinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.
Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog