--- id: munkres version: "1.1.4" license: Apache Software License license_treatment: permissive maintenance: abandoned --- # munkres — Munkres (Hungarian) algorithm for the Assignment Problem License: permissive · Maintenance: abandoned · Downloads: 476.8K/mo ## What it is and what it does Munkres is a pure-Python implementation of the Munkres algorithm, a classical algorithm for solving the Assignment Problem—finding an optimal one-to-one matching between two sets of items given a cost matrix. The algorithm is also known as the Hungarian algorithm or Kuhn-Munkres algorithm. The package provides a straightforward interface to compute the minimum-cost assignment. It has no external runtime dependencies, making it lightweight and easy to integrate. However, the project has been abandoned since its last release on 2020-09-15, meaning no new features or bug fixes will be added. For production use, you should verify that the implementation meets your numerical accuracy and performance requirements. Use it for: - Solving assignment problems in operations research: assigning workers to tasks or resources to projects. - Object tracking in computer vision: matching detected objects across frames by minimizing distance. - Bipartite graph matching: finding optimal pairings between two sets of nodes in network analysis. - Logistics and transportation: assigning delivery routes or vehicles to minimize total cost. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements the Munkres algorithm (Hungarian algorithm) to solve the Assignment Problem, finding optimal one-to-one matchings between sets given a cost matrix. Yes, if you need a lightweight, dependency-free implementation of the Munkres algorithm for a stable, non-evolving use case. The permissive license and low install friction make it accessible. However, the abandoned status (no updates since 2020-09-15) means you should verify the implementation meets your accuracy and performance needs before adopting it in new production systems. ## Install pip install munkres uv add munkres poetry add munkres ## Installing munkres Before you install: Installation is frictionless—a pure Python wheel with no runtime dependencies. However, the package has been abandoned since 2020 (2159 days since last release), so it will not receive bug fixes or updates. License in practice: Licensed under Apache Software License (permissive), so you can use it freely in commercial and open-source projects without restrictive obligations. Quickstart: pip install munkres from munkres import Munkres m = Munkres() cost_matrix = [[1, 2], [3, 4]] indexes = m.compute(cost_matrix) Verify before relying: - Whether the implementation handles edge cases (empty matrices, rectangular cost matrices) correctly - Performance characteristics on large matrices and suitability for your specific use case - Compatibility with current Python versions beyond what the fact sheet specifies ## Package facts - License: Apache Software License (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 476.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags munkres algorithm, hungarian algorithm, assignment problem solver, optimal matching, cost matrix assignment, kuhn-munkres, bipartite matching, algorithm, optimization, matching [View on SkillFed](https://skillfed.io/packages/munkres) · [View on PyPI](https://pypi.org/project/munkres/)