ErrLookupBackground articles › "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries

"not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries

Missing-dependency errors — messages like "The onnxruntime python package is not installed. Please install it with `pip install onnxruntime`", "no suitable markdown gem found", or "Bootstrap's tooltips require Popper" — are raised when a library reaches a code path that needs an optional or external dependency the current environment doesn't provide. This article explains the mechanisms behind the family and how to fix and prevent it across ecosystems.

Distilled from 106 documented records across 34 repositories.

Background

This family covers a single design pattern implemented dozens of times: a library keeps a heavy, platform-specific, or optional dependency out of its core install, then checks for it at the moment it is actually needed. When the check fails, the library converts a raw ImportError, LoadError, MODULE_NOT_FOUND, or undefined-global error into a message that names the missing piece and usually the exact install command. Python libraries like Chroma, LiteLLM, and MLflow dominate the family: Chroma's embedding functions lazily import onnxruntime, open_clip, torch, PIL, tqdm, ollama, and openai inside __init__ and wrap each ImportError in a ValueError with a pip hint; LiteLLM does the same for prometheus_client, aws_sdk_bedrock_runtime, petals, google-cloud-aiplatform, and the paid litellm-enterprise wheel; MLflow guards ragas, zstandard, and tensorflow behind MlflowExceptions with install instructions.

Because the import is deferred, the failure is also deferred — and that timing is the family's most important variable. Chroma's CohereEmbeddingFunction and the constructor succeeds and only the first embedding call (the first await ef.generate([...]) or collection.add with documents) blows up. Bootstrap's Tooltip is the opposite extreme: the constructor checks the Popper namespace before calling super(), so new bootstrap.Tooltip(el) itself fails, while its Dropdown sibling only fails when a menu is first shown. At the far end of the spectrum, some members degrade gracefully instead of failing: oh-my-codex downgrades a detached tmux launch to a direct launch with a warning, and claude-mem's dependency preflight starts the worker anyway but marks the setup 'degraded' and names the broken pieces.

Not every member is about a missing package from a registry. GitHub::Markup ships no Markdown renderer at all and walks a list of gems (commonmarker, github/markdown, redcarpet, ...) with require, raising LoadError 'no suitable markdown gem found' only when every require fails. Bootstrap's standalone UMD build expects a window.Popper global, so a missing script tag, a CDN 404, or a bundler config marking @popperjs/core external produces the same failure shape as an uninstall. deepagents requires the git executable on PATH (checked with shutil.which) rather than any npm module; pghero requires the pg_query gem only when the filter_data config flag is enabled. And some errors are about the right package being installed in the wrong place: a different virtualenv, a different notebook kernel, a pruned Docker image, or a bundler group excluded with --without all make an installed dependency invisible at runtime.

A recurring sub-theme is that seeing the error often means the dependency was removed rather than never added: a resolver conflict uninstalled pillow, a pip resolver dropped tqdm, an image was built with --no-deps or --omit=optional, onnxruntime was replaced by onnxruntime-gpu (both register the same import name and cannot coexist), or an upgrade to Astro made @astrojs/markdown-remark a no-longer-default dependency. The error message is the library's contract: it tells you what it looked for and how to provide it, and in several cases (maigret, MLflow's zstd handler, Chroma's ValueErrors) it also embeds the original underlying error so you can distinguish a true absence from a broken install.

Common causes

What usually fixes it

Documented occurrences

…and 86 more across the corpus — use search.

Honest provenance: generated on 2026-08-29 from AI-assisted analysis of the linked records. See how records are made.