mip
Python tools for Modeling and Solving Mixed-Integer Linear Programs (MIPs)
What it is and what it does
Python MIP is a modeling and solving toolkit for mixed-integer linear programs, designed to make it easy to write optimization problems in Python using operator overloading and a high-level syntax. It communicates directly with native solver libraries via cffi, supporting both the open-source CBC solver and the commercial Gurobi solver with a single, solver-independent codebase.
The package provides advanced features like cut generation, lazy constraints, solution pools, and MIPStart heuristics for warm-starting searches. It requires Python 3.10 or newer and runs on CPython and PyPy. The main dependencies are cffi and cbcbox.
Use it for:
- Model and solve supply chain optimization, production scheduling, or resource allocation problems using a Pythonic syntax
- Implement branch-and-cut algorithms with custom cut generators and lazy constraint callbacks for large-scale MIPs
- Migrate optimization models from existing codebases by leveraging compatible syntax and solver-agnostic code
- Explore multiple near-optimal solutions via solution pools during MIP search
- Accelerate MIP model creation on PyPy for performance-critical applications
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python MIP models and solves mixed-integer linear programs (MIPs) using a high-level syntax with support for advanced solver features like cut generation, lazy constraints, and solution pools.
Yes, if you need to model and solve mixed-integer linear programs in Python. The package is actively maintained, has low install friction, supports current Python versions, and offers a clean API with advanced solver features. The EPL-2.0 copyleft license requires compliance in derivative works. No known security vulnerabilities.
Install
mip on PyPI
pip
pip install mipuv
uv add mippoetry
poetry add mipInstalling mip
Before you install
Low install friction with a pure-wheel distribution. The package is actively maintained (last commit 2026-06-09) and in production-stable status. Runtime depends on cffi and cbcbox.
License in practice
Licensed under Eclipse Public License 2.0 (EPL-2.0), a copyleft license. You may use and modify the package freely, but derivative works and distributions must carry the same license terms and include a copy of the EPL-2.0 agreement.
Quickstart
pip install mip
from mip import Model, xsum, BINARY
m = Model()
x = [m.add_var(var_type=BINARY) for _ in range(10)]
m.objective = xsum(x)
m.optimize()
Requires Python 3.10 or newer; cbcbox solver dependency must be available
Verify before relying
- Whether cbcbox is automatically installed or requires separate system-level solver setup
- Performance comparison claims and their test conditions
- Compatibility with Gurobi solver integration beyond CBC
Package facts
| License | Eclipse Public License - v 2.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES… (full text in the JSON record) (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — cffi, cbcbox |
| Maintenance | actively maintained — 144 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 605,067/month — #5,800 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mip-1.17.6-py3-none-any.whl
Keywords: Optimization, Linear Programming, Integer Programming, Operations Research
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
cylpCyLP provides a Python interface to COIN-OR's…
copyleft · top 15,000 on PyPI
gurobipygurobipy is a Python interface to the Gurobi…
unclear · top 5,000 on PyPI
linopylinopy builds linear, integer, and quadratic…
permissive · top 15,000 on PyPI
PuLPPuLP is a linear and mixed-integer programming…
permissive · top 5,000 on PyPI
ortoolsOR-Tools provides constraint programming,…
permissive · top 5,000 on PyPI
cbcboxcbcbox is a self-contained Python distribution…
copyleft · top 15,000 on PyPI
pyomoPyomo is a Python framework for formulating and…
permissive · top 5,000 on PyPI
amplpyamplpy is a Python interface to AMPL, an…
permissive · top 15,000 on PyPI
docplexModeling library for building and solving…
permissive · top 15,000 on PyPI
clingoClingo is a Python binding to the clingo Answer…
permissive · top 15,000 on PyPI