Files
ortools-clone/tools/README.python.md

63 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

# Introduction
2020-12-05 23:17:55 +01:00
This file describes how to use OR-Tools in python with the binary archives.
2014-01-04 09:38:46 +00:00
OR-Tools online documentation is located at https://developers.google.com/optimization
2014-01-04 09:38:46 +00:00
Full installation instructions are located at https://developers.google.com/optimization/install/python/
2016-08-23 10:45:59 +02:00
These modules have been tested under:
2020-12-05 23:17:55 +01:00
- CentOS 7 LTS and Stream 8 (64 bit).
- Debian 10 and 11 (64 bit).
2022-03-10 14:03:26 +01:00
- Fedora 33 and up (64 bit).
- Opensuse Leap (64 bit).
2022-03-10 14:03:26 +01:00
- Ubuntu 18.04 LTS and up (64 bit).
- MacOS 12.5 Monterey (64 bit).
- Microsoft Windows with Visual Studio 2019 and 2022 (64-bit)
## Codemap
2014-01-04 09:38:46 +00:00
Upon decompressing the archive, you will get the following structure:
2020-12-05 23:17:55 +01:00
```
2014-01-04 09:38:46 +00:00
or-tools/
[LICENSE](LICENSE) <- Apache License.
[README.md](README.md) <- This file.
[examples/python](examples/python) <- Python examples.
[examples/notebook](examples/notebook) <- Jupyter/IPython notebooks.
```
Warning: While OR-Tools ships with SCIP, please consult the SCIP license
to ensure that you are complying with it if you want to use this solver.
## Installation
2020-12-05 23:17:55 +01:00
To install the package:
2020-12-05 23:17:55 +01:00
1. Make sure python and pip are installed
2. Make sure pip is up to date:
2020-12-05 23:17:55 +01:00
```shell
python -m pip -V
```
2020-12-05 23:17:55 +01:00
should return 9.0.1 otherwise, run: `python -m pip install --upgrade --user pip`
3. Fetch `ortools` from Pypi:
2020-12-05 23:17:55 +01:00
```shell
python -m pip install --upgrade --user ortools
```
2020-12-05 23:17:55 +01:00
It should pull the latest version of OR-Tools.
## Usage
2020-12-05 23:17:55 +01:00
To run a first example:
2020-12-05 23:17:55 +01:00
```shell
python examples/python/hidato_table.py
```