skillfed

mip

Python tools for Modeling and Solving Mixed-Integer Linear Programs (MIPs)

mip v1.17.6 605.1K downloads/30d#5,800 on PyPI597
Copyleft 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) Active released

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 mip

uv

uv add mip

poetry

poetry add mip

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)Operating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Scientific/Engineering :: Mathematics

Tags

mixed integer linear programmingMIP solver pythonlinear optimization modelinginteger programming librarybranch and cut solvermathematical optimization pythonconstraint programming
optimizationoperations-researchsolver-integration

More Mathematics packages