skillfed

pyomo

The Pyomo optimization modeling framework

pyomo v6.10.1 1.4M downloads/30d#3,921 on PyPI2,505
Permissive license BSD-3-Clause Active released

What it is and what it does

Pyomo is a Python-based optimization modeling framework that lets you define mathematical optimization problems symbolically and solve them using external solvers. It abstracts away the low-level details of problem formulation, allowing you to write optimization models in readable Python code rather than solver-specific syntax. The framework supports a wide range of problem types—from simple linear programs to complex mixed-integer stochastic programs and differential algebraic equations—making it suitable for research, prototyping, and production optimization workflows.

You use Pyomo to build a model object, define variables and constraints, specify an objective function, and then pass the model to a solver of your choice. The package itself contains no solver; it is a modeling and scripting layer that translates your Python code into solver input formats. This design allows you to switch solvers without rewriting your model, and to leverage Python's full programming capabilities—loops, conditionals, data structures—within your optimization workflow.

Use it for:

  • Formulate and solve linear or mixed-integer programming problems for supply chain, scheduling, or resource allocation.
  • Build stochastic optimization models for decision-making under uncertainty in energy, finance, or operations.
  • Prototype nonlinear optimization problems in research or engineering without learning solver-specific languages.
  • Develop high-level optimization tools or frameworks that abstract Pyomo's modeling layer for domain-specific users.
  • Combine optimization with Python data analysis (pandas, numpy) in a single workflow for end-to-end decision support.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Pyomo is a Python framework for formulating and solving optimization problems, supporting linear, quadratic, nonlinear, mixed-integer, stochastic, and constraint programming models with external solvers.

Yes. Pyomo is production-stable, actively maintained, permissively licensed, and has no install friction. It is the standard choice for optimization modeling in Python when you need flexibility across problem types and solvers. Install it if you are solving any optimization problem and want to work in Python; the main gotcha is that you must separately install or configure a solver backend.

Install

pyomo on PyPI

pip

pip install pyomo

uv

uv add pyomo

poetry

poetry add pyomo

Installing pyomo

Before you install

Low friction installation via pip; actively maintained with recent releases and 2505 GitHub stars. Tested on CPython 3.10–3.14 and PyPy 3.11, with no runtime dependencies to manage.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; attribution and license inclusion required.

Quickstart

pip install pyomo

from pyomo.environ import ConcreteModel, Var, Objective, Constraint, SolverFactory

model = ConcreteModel()
model.x = Var(bounds=(0, 10))
model.obj = Objective(expr=model.x**2)
solver = SolverFactory('ipopt')
results = solver.solve(model)

Requires an external solver (e.g., ipopt, glpk, cplex) to be installed separately; Pyomo itself is a modeling layer only.

Verify before relying

  • Whether specific solvers (ipopt, glpk, cplex, gurobi, etc.) are pre-packaged or must be installed separately.
  • Performance characteristics for large-scale problems (model size limits, solve time expectations).
  • Availability of GPU acceleration or parallel solving capabilities.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 71 days since the last release
Last repo commit
First released
Downloads 1,423,318/month — #3,921 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyomo-6.10.1-py3-none-any.whl

Keywords: optimization

Development Status :: 5 - Production/StableIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: Libraries :: Python Modules

Tags

optimization modeling frameworklinear programming pythonmixed-integer programmingconstraint programming solvermathematical optimization librarystochastic programmingnonlinear optimization python
optimizationmathematical-programmingsolver-agnostic

More Python Modules packages