Install OR-Tools

  • Google's OR-Tools, primarily built in C++, offers software libraries for tackling optimization problems and is available for Python, Java, and C# (.NET).

  • Users can quickly install OR-Tools for Python using pip with the command python -m pip install ortools, preferably within a virtual environment.

  • Detailed installation guides and prerequisites for all supported languages (C++, .NET, Java, Python) are accessible through provided links.

  • Pre-built binaries for various operating systems and architectures are available for download, along with source files for custom installations.

  • While OR-Tools supports third-party solvers, they necessitate installation from source files.

Google created OR-Tools in C++, but you can also use it with Python, Java, or C# (on the .NET platform).

Install OR-Tools for Python

The fastest way to get OR-Tools is to install the Python binary version. If you already have Python (version 3.8+ on Linux, macOS or Windows), and the Python package manager PIP, you can install OR-Tools as follows:

python -m pip install ortools

After the installation is complete, you are ready to get started with OR-Tools for Python.

To install OR-Tools for another language or from source, see the next section.

Installation instructions for all supported languages

For instructions on installing OR-Tools, as well as the required prerequisites, click one of the following links:

If you're already familiar with installing OR-Tools and just want to download the latest version, you can get it either from a binary distribution or the source file.

If you need to install an older version, the OR-Tools release page has links to downloads for past releases.

Binary distributions

Here, are links to the OR-Tools binary distributions by language and platform.

Python

The easiest way to install OR-Tools for Python is from the command line, as shown above.

However, if you prefer, you can install OR-Tools from one of the Python wheel files.

C++

C++ OR-Tools prebuilt archives.

Linux
macOS
Windows

.Net

.Net OR-Tools prebuilt archives.

Linux
macOS
Windows

Java

Java OR-Tools prebuilt archives.

Linux
macOS
Windows

Source files

To get the source files for the latest release of OR-Tools, you can either:

Docker

No official images for OR-Tools on the Google Cloud registry is provided.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-03-18 UTC.