Installing OR-Tools for Python from Binary on Windows

Introduction

This guide explains how to install OR-Tools for Python on Windows.

Although these instructions might also work on other Windows variants, we have only tested them on machines meeting the following requirements:

  • Windows 10 64-bit (x86_64) with
  • Microsoft Visual Studio 2017 or Visual Studio Community 2017

Python

You must have at least one of the following versions of Python installed:

Then verify that you have pip 9.01 or higher available in your PATH:

python --version
python -c "import platform; print(platform.architecture()[0])"
python -m pip --version

Installing OR-Tools

Assuming the prerequisite software is installed on your Windows, take the following steps:

python -m pip install --user ortools

Uninstalling OR-Tools

To uninstall OR-Tools, issue the following commands:

python -m pip uninstall ortools

Validate your installation

To test your Python installations, open a x64 Native Tools Command Prompt. Then enter the following command:

python -c "from ortools.linear_solver import pywraplp"

If it runs successfully, you are ready to get started with OR-Tools.

Send feedback about...