Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Google a créé OR-Tools en C++, mais vous pouvez également l'utiliser avec Python, Java ou C#.
(sur la plate-forme .NET).
Installer OR-Tools pour Python
Le moyen le plus rapide d'obtenir OR-Tools consiste à installer la version binaire Python.
Si vous disposez déjà de Python (version 3.8 ou ultérieure sous Linux, macOS ou Windows) et que
le gestionnaire de packages Python PIP, vous pouvez installer
OR-Tools comme suit:
Si vous avez l'habitude d'installer OR-Tools et que vous souhaitez simplement télécharger
la dernière version, vous pouvez l'obtenir à partir d'une distribution binaire
ou le fichier source.
Si vous devez installer une ancienne version,
La page des versions OR-Tools contient des liens.
aux téléchargements
des versions précédentes.
Distributions binaires
Voici des liens vers les distributions binaires OR-Tools par langage et par plate-forme.
Python
Le moyen le plus simple d'installer OR-Tools
pour Python est d'utiliser la ligne de commande,
comme indiqué ci-dessus.
Toutefois, si vous préférez, vous pouvez installer OR-Tools à partir de l'un des
fichiers wheel.
Aucune image officielle pour OR-Tools dans le registre Google Cloud n'est fournie.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/08/23 (UTC).
[null,null,["Dernière mise à jour le 2024/08/23 (UTC)."],[[["\u003cp\u003eGoogle's OR-Tools, primarily built in C++, offers software libraries for tackling optimization problems and is available for Python, Java, and C# (.NET).\u003c/p\u003e\n"],["\u003cp\u003eUsers can quickly install OR-Tools for Python using pip with the command \u003ccode\u003epython -m pip install ortools\u003c/code\u003e, preferably within a virtual environment.\u003c/p\u003e\n"],["\u003cp\u003eDetailed installation guides and prerequisites for all supported languages (C++, .NET, Java, Python) are accessible through provided links.\u003c/p\u003e\n"],["\u003cp\u003ePre-built binaries for various operating systems and architectures are available for download, along with source files for custom installations.\u003c/p\u003e\n"],["\u003cp\u003eWhile OR-Tools supports third-party solvers, they necessitate installation from source files.\u003c/p\u003e\n"]]],["OR-Tools, initially created in C++, is accessible via Python, Java, and C#. For Python, install using `python -m pip install ortools`, preferably within a virtual environment. Installation instructions and prerequisites are available for C++, .Net, Java, and Python. Binary distributions, including Python wheel files and prebuilt C++, .Net, and Java archives for various Linux, macOS, and Windows versions, are provided. Source files and older versions can be downloaded, and third-party solver users must install from source.\n"],null,["# Install OR-Tools\n\nGoogle created OR-Tools in C++, but you can also use it with Python, Java, or C#\n(on the .NET platform).\n\nInstall OR-Tools for Python\n---------------------------\n\nThe fastest way to get OR-Tools is to install the Python binary version.\nIf you already have Python (version 3.8+ on Linux, macOS or Windows), and the\nPython package manager [PIP](https://pypi.org/project/pip/), you can install\nOR-Tools as follows: \n\n python -m pip install ortools\n\n| **Tip:** You should install `ortools` in a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#)\n\nAfter the installation is complete, you are ready to\n[get started with OR-Tools for Python](/optimization/introduction/python).\n\nTo install OR-Tools for another language or from source, see the next section.\n\nInstallation instructions for all supported languages\n-----------------------------------------------------\n\nFor instructions on installing OR-Tools, as well as the required prerequisites,\nclick one of the following links:\n\n- [OR-Tools for C++](/optimization/install/cpp)\n- [OR-Tools for .Net](/optimization/install/dotnet)\n- [OR-Tools for Java](/optimization/install/java)\n- [OR-Tools for Python](/optimization/install/python)\n\nDownload OR-Tools\n-----------------\n\nIf you're already familiar with installing OR-Tools and just want to download\nthe latest version, you can get it either from a [binary distribution](#binary)\nor the [source file](#source).\n| **Note:** If you plan to use a third-party solver with OR-Tools, you need to install OR-Tools from the source files.\n\nIf you need to install an older version, the\n[OR-Tools release page](https://github.com/google/or-tools/releases) has links\nto downloads for past releases.\n\n### Binary distributions\n\nHere, are links to the OR-Tools binary distributions by language and platform.\n\n#### Python\n\nThe easiest way to install OR-Tools for Python is from the command line,\n[as shown above](#python).\n\nHowever, if you prefer, you can install OR-Tools from one of the Python\n[wheel files](https://pypi.org/project/ortools/#files).\n\n#### C++\n\nC++ OR-Tools prebuilt archives.\n\n##### Linux\n\n- [Almalinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_almalinux-9_cpp_v9.12.4544.tar.gz)\n- [Alpine Edge](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_alpine-edge_cpp_v9.12.4544.tar.gz)\n- [Debian SID](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-sid_cpp_v9.12.4544.tar.gz)\n- [Debian 12](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-12_cpp_v9.12.4544.tar.gz)\n- [Debian 11](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-11_cpp_v9.12.4544.tar.gz)\n- [Fedora 41](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-41_cpp_v9.12.4544.tar.gz)\n- [Fedora 40](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-40_cpp_v9.12.4544.tar.gz)\n- [Rockylinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_rockylinux-9_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 24.10](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.10_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 24.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.04_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 22.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-22.04_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 20.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-20.04_cpp_v9.12.4544.tar.gz)\n\n##### macOS\n\n- [macOS M1](https://github.com/google/or-tools/releases/download/v9.12/or-tools_arm64_macOS-15.3.1_cpp_v9.12.4544.tar.gz)\n- [macOS Intel](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x86_64_macOS-15.3.1_cpp_v9.12.4544.tar.gz)\n\n##### Windows\n\n- [Visual Studio 2022](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x64_VisualStudio2022_cpp_v9.12.4544.zip)\n\n#### .Net\n\n.Net OR-Tools prebuilt archives.\n\n##### Linux\n\n- [Almalinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_almalinux-9_dotnet_v9.12.4544.tar.gz)\n- [Alpine Edge](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_alpine-edge_dotnet_v9.12.4544.tar.gz)\n- [Debian 12](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-12_dotnet_v9.12.4544.tar.gz)\n- [Debian 11](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-11_dotnet_v9.12.4544.tar.gz)\n- [Fedora 41](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-41_dotnet_v9.12.4544.tar.gz)\n- [Fedora 40](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-40_dotnet_v9.12.4544.tar.gz)\n- [Rockylinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_rockylinux-9_dotnet_v9.12.4544.tar.gz)\n- [Ubuntu 24.10](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.10_dotnet_v9.12.4544.tar.gz)\n- [Ubuntu 24.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.04_dotnet_v9.12.4544.tar.gz)\n- [Ubuntu 22.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-22.04_dotnet_v9.12.4544.tar.gz)\n- [Ubuntu 20.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-20.04_dotnet_v9.12.4544.tar.gz)\n\n##### macOS\n\n- [macOS M1](https://github.com/google/or-tools/releases/download/v9.12/or-tools_arm64_macOS-15.3.1_dotnet_v9.12.4544.tar.gz)\n- [macOS Intel](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x86_64_macOS-15.3.1_dotnet_v9.12.4544.tar.gz)\n\n##### Windows\n\n- [Visual Studio 2022](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x64_VisualStudio2022_dotnet_v9.12.4544.zip)\n\n#### Java\n\nJava OR-Tools prebuilt archives.\n\n##### Linux\n\n- [Almalinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_almalinux-9_java_v9.12.4544.tar.gz)\n- [Alpine Edge](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_alpine-edge_java_v9.12.4544.tar.gz)\n- [Debian 12](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-12_java_v9.12.4544.tar.gz)\n- [Debian 11](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-11_java_v9.12.4544.tar.gz)\n- [Fedora 41](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-41_java_v9.12.4544.tar.gz)\n- [Fedora 40](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-40_java_v9.12.4544.tar.gz)\n- [Rockylinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_rockylinux-9_java_v9.12.4544.tar.gz)\n- [Ubuntu 24.10](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.10_java_v9.12.4544.tar.gz)\n- [Ubuntu 24.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.04_java_v9.12.4544.tar.gz)\n- [Ubuntu 22.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-22.04_java_v9.12.4544.tar.gz)\n- [Ubuntu 20.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-20.04_java_v9.12.4544.tar.gz)\n\n##### macOS\n\n- [macOS M1](https://github.com/google/or-tools/releases/download/v9.12/or-tools_arm64_macOS-15.3.1_java_v9.12.4544.tar.gz)\n- [macOS Intel](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x86_64_macOS-15.3.1_java_v9.12.4544.tar.gz)\n\n##### Windows\n\n- [Visual Studio 2022](https://github.com/google/or-tools/releases/download/v9.12/or-tools_x64_VisualStudio2022_java_v9.12.4544.zip)\n\n### Source files\n\nTo get the source files for the latest release of OR-Tools, you can either:\n\n- Download them in a [tar.gz]() or [.zip]() file.\n- Clone them from the [OR-Tools repository on GitHub](https://github.com/google/or-tools).\n\n### Docker\n\nNo official images for OR-Tools on the Google Cloud registry is provided."]]