detect-installer
Detect how a Python package was installed and get the correct upgrade command
Decision gist · record as of 2026-08-14
Yes. The package solves a real problem with zero dependencies, active maintenance, no known vulnerabilities, and a permissive license. It's lightweight and either installable normally or vendorable directly into your project. Install it if you need to detect or recommend upgrade commands based on how a package was installed.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: zero runtime dependencies and a pure-Python wheel.
- Maintenance status is active with a recent release.
License · maintenance · safety
0BSD (permissive) — 0BSD is permissive and places no restrictions on use, modification, or distribution. The package explicitly notes it can be vendored directly into projects to avoid adding a dependency.
last release 2026-02-23 (172 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,405,742 downloads/mo, #1,282 on PyPI
Alternatives
Verify before relying
pip install detect-installer
from detect_installer import detect_installer
info = detect_installer("rich")
if info:
print(info.upgrade_cmd)- Whether detection works reliably across all supported installers (pip, uv, pipx, Homebrew, Conda, Mamba) in edge cases.
- How the package handles packages installed via multiple methods or in virtual environments created by different tools.
What it is and what it does
detect-installer identifies which package manager was used to install a Python package on the current system and generates the correct upgrade command for that manager. It supports pip, uv (both project and pip modes), uv tool, pipx, Homebrew, Conda, and Mamba. The package has no runtime dependencies and is published under a permissive license, making it suitable for vendoring directly into projects if you want to avoid adding a dependency.
The typical use case is in tools or scripts that need to upgrade packages but must use the same installer that originally installed them. For example, a package manager wrapper or development utility might call detect_installer to determine whether to run `pip install -U`, `uv pip install -U`, `pipx upgrade`, or a conda/mamba equivalent.
Use it for
- Build tools or package managers that need to upgrade dependencies using the same installer that installed them.
- Development utilities that auto-upgrade packages and must preserve the user's original installation method.
- CLI applications that guide users on how to upgrade themselves based on their installation method.
- Testing frameworks that verify package upgrades work correctly across different installer ecosystems.
- Documentation generators or setup helpers that detect and report on the current installation method.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real problem with zero dependencies, active maintenance, no known vulnerabilities, and a permissive license. It's lightweight and either installable normally or vendorable directly into your project. Install it if you need to detect or recommend upgrade commands based on how a package was installed.
Install
detect-installer on PyPI
Before you install
Low friction: zero runtime dependencies and a pure-Python wheel. Maintenance status is active with a recent release.
Requires Python 3.10 or later.
License in practice
0BSD is permissive and places no restrictions on use, modification, or distribution. The package explicitly notes it can be vendored directly into projects to avoid adding a dependency.
Quickstart
pip install detect-installer
from detect_installer import detect_installer
info = detect_installer("rich")
if info:
print(info.upgrade_cmd)
Verify before relying
- Whether detection works reliably across all supported installers (pip, uv, pipx, Homebrew, Conda, Mamba) in edge cases.
- How the package handles packages installed via multiple methods or in virtual environments created by different tools.
Package facts
| License | 0BSD permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 172 days since the last release |
| First released | |
| Downloads | 13,405,742 / month, #1,282 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: detect_installer-0.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “detect package manager”
- detect-installerDetects which package manager installed a given Python package and…
- pidManages process ID files with stale detection, file locking, and…
- abxpkgUnified interface for detecting, installing, and managing binary and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also pipmaster · pre-commit-uv · PyPgConfig · shellingham · update · ggshield · darkdetect · detect-delimiter · lib-detect-testenv · napari-plugin-manager