--- id: gurobipy version: "13.0.2" license: Proprietary license_treatment: unclear maintenance: active --- # gurobipy — Python interface to Gurobi License: unclear · Maintenance: active · Downloads: 1.4M/mo ## What it is and what it does gurobipy is the official Python binding for Gurobi, a commercial optimization solver. It allows you to build optimization models in Python by defining variables, objective functions, and constraints, then solve them using Gurobi's underlying engine. The package supports mixed-integer linear programming (MIP), linear programming (LP), and quadratic optimization. The package comes with a trial license that works out of the box but is limited to small problems. For production use or larger models, you need an academic license (free for students and staff at accredited institutions) or a commercial license. Installation is straightforward across modern Python versions and major platforms, but the licensing model means you cannot use it in production without obtaining the appropriate license. Use it for: - Solve supply chain and logistics optimization problems with integer constraints and large-scale linear models. - Formulate and solve financial portfolio optimization, asset allocation, and risk management models. - Tackle engineering design problems involving resource allocation, scheduling, and capacity planning. - Prototype optimization algorithms in research or academic settings using the free academic license. - Build production optimization applications with a commercial license for manufacturing or operations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. gurobipy is a Python interface to the Gurobi Optimizer for solving mixed-integer linear and quadratic optimization problems. It lets you formulate and solve optimization models directly from Python. Yes, if you have a valid license or qualify for an academic license and need to solve mixed-integer or quadratic optimization problems. The trial license is useful for prototyping but not for production. If you need an open-source solver without licensing restrictions, consider alternatives; if you need industrial-grade performance, this is a leading choice. ## Install pip install gurobipy uv add gurobipy poetry add gurobipy ## Installing gurobipy Before you install: Medium install friction: the package provides pre-built wheels for multiple Python versions (3.10–3.14) and platforms (macOS, Linux x86_64, Linux aarch64, Windows), but requires a valid license to function beyond trial evaluation. License in practice: Licensed under a proprietary Evaluation License restricting use to non-production environments and limited problem sizes. Academic users and staff qualify for free full licenses; commercial users must request evaluation or purchase separately. The license is not open source and imposes strict usage restrictions. Quickstart: import gurobipy as gp m = gp.Model() x = m.addVar(vtype='B', name='x') y = m.addVar(vtype='B', name='y') m.setObjective(x + y, gp.GRB.MAXIMIZE) m.addConstr(x + y <= 1) m.optimize() print(f"Optimal value: {m.objVal}") Requires a valid license (trial, academic, or commercial). The trial license bundled with pip install has size constraints on solvable problems. Verify before relying: - Specific size limits (variable/constraint counts) imposed by the trial license - Performance characteristics and solver speed relative to open-source alternatives - Whether academic license activation requires manual registration or is automatic ## Package facts - License: Proprietary (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mixed-integer linear programming solver, mathematical optimization library, MIP solver python, quadratic optimization, constraint optimization, linear programming python, optimization modeling, optimization, commercial-solver, licensing-required [View on SkillFed](https://skillfed.io/packages/gurobipy) · [View on PyPI](https://pypi.org/project/gurobipy/)