Skip to main content

# The Python Interface to LINGO.

This package requires Lingo and a valid license key. Please refer to the [Lingo user manual](https://lindo.com/downloads/PDF/LINGO.pdf) for installation instructions, and to learn more about the Lingo modeling language.

## Installation For LINGO 21

This python package can be installed with pip. It is assumed Lingo 21 is installed on host system.

For administrative users:

`bash > pip install lingo_api `

For standard (non-administrative) users:

`bash > pip install lingo_api --user `

## Installation For LINGO 20

This python package can be installed with pip. It is assumed Lingo 20 is installed on host system.

For administrative users:

`bash > pip install lingo_api==20.0.9 `

For standard (non-administrative) users:

`bash > pip install lingo_api==20.0.9 --user `

## Testing

A quick way to test the installation is to run `bash > python -m lingo_test `

It is also good to test the LINGO API on one of the included examples. ` > cd examples/CHESS > python chess.py `

## Possible errors due to misconfiguration

If the user does not have the correct LINGO environment variable set, they will not be able to load the lingo_api library instead they will receive an error message.

To fix the problem follow these steps

### Using Windows On the command line depending on the users LINGO installation:

LINGO 21 on windows 64-bit `dos > setx LINGO64_21_HOME "C:\path\to\LINGO64_21" ` LINGO 21 on windows 32-bit `dos > setx LINGO_21_HOME "C:\path\to\LINGO21" `

LINGO 20 on windows 64-bit `dos > setx LINGO64_20_HOME "C:\path\to\LINGO64_20" ` LINGO 20 on windows 32-bit `dos > setx LINGO_20_HOME "C:\path\to\LINGO20" `

### Using Linux On the command line depending on the users LINGO installation:

LINGO 21 For administrative users: ` $ export LINGO64_21_HOME="/opt/lingo21" ` For standard (non-administrative) users: ` $ export LINGO64_21_HOME="~/lingo21" `

LINGO 20 For administrative users: ` $ export LINGO64_20_HOME="/opt/lingo20" ` For standard (non-administrative) users: ` $ export LINGO64_20_HOME="~/lingo20" `

To have this variable set automatically, add the above line to the ~/.bashrc or ~/.bash_profile file.

## How to Build Wheel and Install (for package managers)

To build the python package on any operating system first start by creating a whl file. From the top of the lingoapi-python directory run the command.

`bash > python -m build `

If the command is successful a new directory named dist is created in the lingoapi-python directory. The new directory will have two files with extension .whl and .tar.gz. For example, if the LINGO API is built it on Windows using Python 3.10 the new directory will look like this.

`bash ├── dist │ ├── lingo_api-x.y.z-cp310-cp310-win_amd64.whl │ └── lingo-x.y.z.tar.gz `

The package can now be installed locally using the command. `bash > pip install dist/*.whl `

Release files for lingo-api 22.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for lingo-api 22.0.2
File
lingo_api-22.0.2-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
lingo_api-22.0.2-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
lingo_api-22.0.2-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
lingo_api-22.0.2-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details
lingo_api-22.0.2-cp39-cp39-manylinux_2_34_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.34+ x86-64 Details
lingo_api-22.0.2-cp38-cp38-manylinux_2_34_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.34+ x86-64 Details

Total release size: 223.7 MB

Release files / lingo_api-22.0.2-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL lingo_api-22.0.2-cp313-cp313-manylinux_2_34_x86_64.whl
Size 37.3 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
a9c23cefc500f308e78563af65569ec3955db87661205b648fa09766aff36889
BLAKE2b-256 checksum
How to use checksums
793ef33a88afcd4f79eac4a774dbb31a56680f7c5c5edf4a4f9db3da8f5a21e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / lingo_api-22.0.2-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL lingo_api-22.0.2-cp312-cp312-manylinux_2_34_x86_64.whl
Size 37.3 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
5b7181b85066a06db9e98b2f25caa5ea3a9f30dbb901153cc464cf72f5d6a088
BLAKE2b-256 checksum
How to use checksums
f1a23129dcf1a15d9166999b8e4429d54878245bc762961576903117b51e4c15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / lingo_api-22.0.2-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL lingo_api-22.0.2-cp311-cp311-manylinux_2_34_x86_64.whl
Size 37.3 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
9c4db2272e39fe8d15672893dbaab74f27a0e06a22f4dd0bf41588e8d267bf9e
BLAKE2b-256 checksum
How to use checksums
898c98167b8bb4a1c20e99fc479bde1cfdd547f62ea2d4757ea85e32ecb3eccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / lingo_api-22.0.2-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL lingo_api-22.0.2-cp310-cp310-manylinux_2_34_x86_64.whl
Size 37.3 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
463890422cc2f06819cf79f0fd3dc7de722c44d179c0292a830bded8f7ccaf8d
BLAKE2b-256 checksum
How to use checksums
8c23b5ad1d54d5d4ba888cfc7438fd2e8498a119f19e7919d934f9b3a1071318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / lingo_api-22.0.2-cp39-cp39-manylinux_2_34_x86_64.whl

Download URL lingo_api-22.0.2-cp39-cp39-manylinux_2_34_x86_64.whl
Size 37.3 MB
Tags CPython 3.9 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
2d6abf12d16c3e3b202b6cd207b68628320474d941f2b1bd3335788cd07c5d10
BLAKE2b-256 checksum
How to use checksums
a9efdd7ecfde9b8364812bcab21a97a3f3f188f849c36be21181c123c20973c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / lingo_api-22.0.2-cp38-cp38-manylinux_2_34_x86_64.whl

Download URL lingo_api-22.0.2-cp38-cp38-manylinux_2_34_x86_64.whl
Size 37.3 MB
Tags CPython 3.8 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
20feeb2fbffe63340ce538d3d0eeeb44124b89ba85a59c77e66e42d7f7fbb74d
BLAKE2b-256 checksum
How to use checksums
850205d931ff979bb780e508f8250bf7fd488fb88d158e8043d149c20c8fe7b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

22.0.2 This release

6 release files

22.0.1

6 release files

22.0.0

7 release files

21.0.9

6 release files

21.0.8

6 release files

20.0.8

5 release files

20.0.0

8 release files

19

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page