Skip to main content

Python interface to LINGO API

Project description

# 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 `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lingo_api-22.0.1-cp313-cp313-manylinux_2_34_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

lingo_api-22.0.1-cp312-cp312-manylinux_2_34_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

lingo_api-22.0.1-cp311-cp311-manylinux_2_34_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

lingo_api-22.0.1-cp310-cp310-manylinux_2_34_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

lingo_api-22.0.1-cp39-cp39-manylinux_2_34_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

lingo_api-22.0.1-cp38-cp38-manylinux_2_34_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

File details

Details for the file lingo_api-22.0.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-22.0.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 abfb39d6a2685141da3c7ba53c04bc7d6dcf2784c941f05177934c8a3b77c0d0
MD5 d353b146d1e14afaa9bb0010529cf91f
BLAKE2b-256 5916ea782356c813f139ae162353d8375e880d6f404d9a3f8bf0219dbb9f193b

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-22.0.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 af989347dcd2e004fff37d80a5ec18b4116420217976b8db3775a538b480a59f
MD5 e69d1c04864c7c9d4b7b7bc8d1f56fa4
BLAKE2b-256 832cfb21037321cdc8a99aa9af61100fd72bd2d765739eab160da9c741b40998

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-22.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ead433471fdc7fafb45d00d6028c44e174b0f2d8ef653c6eb96c0ee506de6159
MD5 4fa54691f1a8a18cb159460967c20d12
BLAKE2b-256 b990e747405eb37d558356a6869712221025a5699d3929dbc283a3eaa141d7b9

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-22.0.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 39c224879e5989b47239d83fab4554eb155e888de926daca7f5163fec6e885e9
MD5 d6586bf1be45c038f98b11dde1d97407
BLAKE2b-256 e9fa424e612a872480551161f161a2fa31105ce9a077a5f13b5da085f562cac7

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.1-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-22.0.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f3806d8439b95a35582e42b6505e9079e345ffdf6e6aede3d9d6662fa8dc632f
MD5 e7485eb756d29a7796da3bcfd2532b5c
BLAKE2b-256 a027d45eed27b509e6ebb34f7079aa82a890173cc67555689eeee5084b5b6037

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.1-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-22.0.1-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9e7aabe52bfb1303872768520f11f7975d58a9f4d433a5e9e745ecf1fe931474
MD5 a26a1b74db144f8b121dbe8b24ab951e
BLAKE2b-256 cdc628afeee8821e2ca0638f1596b70d029f4843f60cba326d31ed617b6ea463

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page