skillfed

ortools

Google OR-Tools python libraries and modules

ortools v9.15.6755 6.6M downloads/30d#1,879 on PyPI13,896
Permissive license Apache 2.0 Active released

What it is and what it does

OR-Tools is Google's open-source operations research library that bundles multiple specialized solvers for combinatorial optimization problems. It includes constraint programming solvers (CP-SAT and original CP), linear and mixed-integer programming optimizers (Glop and MPSolver wrappers), a vehicle routing library, and graph algorithms for shortest paths, min-cost flows, and assignments. The package wraps C++ implementations with Python bindings and depends on numpy, pandas, protobuf, absl-py, typing-extensions, and immutabledict for data handling and type support.

Developers use OR-Tools to model and solve real-world scheduling, routing, assignment, and resource allocation problems. It's particularly suited for problems where you need to optimize an objective function subject to constraints—typical in logistics, manufacturing, workforce scheduling, and network optimization. The library supports both commercial solvers (Gurobi, SCIP) and open-source alternatives (CBC, CLP, GLPK) through its MPSolver wrapper, giving flexibility in solver choice and licensing.

Use it for:

  • Optimize vehicle routes for delivery or service networks with time windows and capacity constraints.
  • Solve workforce scheduling problems to assign workers to shifts while respecting availability and skill requirements.
  • Find optimal resource allocation in manufacturing or project management under budget and time constraints.
  • Compute shortest paths, minimum-cost flows, or maximum flows in large graphs for network optimization.
  • Model and solve bin packing, knapsack, or assignment problems in supply chain and logistics planning.

Worth the install?

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

OR-Tools provides constraint programming, linear and mixed-integer programming, vehicle routing, and graph algorithm solvers developed at Google for operations research problems.

Yes. OR-Tools is a mature, actively maintained library from Google with no known vulnerabilities, permissive licensing, and broad platform support. Install friction is moderate due to compiled components, but pre-built wheels cover common Python versions and architectures. It is the right choice for operations research and combinatorial optimization work, especially when you need multiple solver types or want to compare commercial and open-source solvers.

Install

ortools on PyPI

pip

pip install ortools

uv

uv add ortools

poetry

poetry add ortools

Installing ortools

Before you install

Medium install friction due to compiled C++ components across multiple Python versions and platforms. Active maintenance with recent commits and stable production status; 13896 repository stars indicate established community adoption.

License in practice

Apache 2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research applications.

Quickstart

pip install ortools

from ortools.linear_solver import pywraplp

solver = pywraplp.Solver.CreateSolver('GLOP')
if not solver:
    print('Could not create solver')

Requires Python 3.9 or later; compiled wheels available for macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows (amd64).

Verify before relying

  • Whether the package includes pre-built solvers (CBC, CLP, GLPK) or requires separate installation of commercial solvers like Gurobi or SCIP.
  • Performance characteristics and scalability limits for large constraint programming or vehicle routing problems.
  • Whether graph algorithm implementations are optimized for specific graph sizes or problem structures.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 6 — absl-py, numpy, pandas, protobuf, typing-extensions, immutabledict
Maintenance actively maintained — 212 days since the last release
Last repo commit
First released
Downloads 6,632,679/month — #1,879 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ortools-9.15.6755-cp310-cp310-macosx_10_15_x86_64.whl; ortools-9.15.6755-cp310-cp310-macosx_11_0_arm64.whl; ortools-9.15.6755-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; ortools-9.15.6755-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ortools-9.15.6755-cp310-cp310-win_amd64.whl; ortools-9.15.6755-cp311-cp311-macosx_10_15_x86_64.whl; ortools-9.15.6755-cp311-cp311-macosx_11_0_arm64.whl; ortools-9.15.6755-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; ortools-9.15.6755-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ortools-9.15.6755-cp311-cp311-win_amd64.whl; ortools-9.15.6755-cp312-cp312-macosx_10_15_x86_64.whl; ortools-9.15.6755-cp312-cp312-macosx_11_0_arm64.whl; ortools-9.15.6755-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; ortools-9.15.6755-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ortools-9.15.6755-cp312-cp312-win_amd64.whl; ortools-9.15.6755-cp313-cp313-macosx_10_15_x86_64.whl; ortools-9.15.6755-cp313-cp313-macosx_11_0_arm64.whl; ortools-9.15.6755-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; ortools-9.15.6755-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; ortools-9.15.6755-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Keywords: operations research, constraint programming, linear programming, flow algorithms, python

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: BSD :: FreeBSDOperating System :: POSIX :: BSD :: NetBSDOperating System :: POSIX :: BSD :: OpenBSDOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Office/Business :: SchedulingTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules

Tags

constraint programming solverlinear programming optimizationvehicle routing problemmixed-integer programminggraph algorithms shortest pathoperations research libraryoptimization solver python
optimizationoperations-researchconstraint-programming

More Software Development packages