externally managed environment
A marker, defined in PEP 668, that tells pip a Python belongs to the operating system or another package manager and must not be changed with pip.
Overriding it with --break-system-packages can break operating system tools that depend on the system Python.
In more detail
On recent Debian, Ubuntu, Fedora and Homebrew Pythons, pip install outside a virtual environment stops with error: externally-managed-environment. The right answer is a virtual environment, the distribution's own package, or pipx for command-line tools. The --break-system-packages flag overrides it and is exactly as risky as it sounds.
Related terms
- virtual environment — A self-contained folder with its own Python and its own installed packages, so each project's packages stay separate.
- pipx — A tool that installs a Python command-line application into its own private virtual environment and puts only its command on PATH.
- system Python — The copy of Python that the operating system installs for its own tools, which you should leave alone.
- pip — Python's standard package installer, which downloads packages from the Python Package Index and installs them.
Taught in
- Installing Python On Linux — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- pip, requirements, and installing packages — Hands-on Python: Complete Video Course & Book