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.0-cp313-cp313-win_amd64.whl (20.8 kB view details)

Uploaded CPython 3.13Windows x86-64

lingo_api-22.0.0-cp312-cp312-win_amd64.whl (20.8 kB view details)

Uploaded CPython 3.12Windows x86-64

lingo_api-22.0.0-cp311-cp311-win_amd64.whl (20.7 kB view details)

Uploaded CPython 3.11Windows x86-64

lingo_api-22.0.0-cp310-cp310-win_amd64.whl (20.8 kB view details)

Uploaded CPython 3.10Windows x86-64

lingo_api-22.0.0-cp39-cp39-win_amd64.whl (20.8 kB view details)

Uploaded CPython 3.9Windows x86-64

lingo_api-22.0.0-cp38-cp38-win_amd64.whl (20.7 kB view details)

Uploaded CPython 3.8Windows x86-64

lingo_api-22.0.0-cp37-cp37m-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.7mWindows x86-64

File details

Details for the file lingo_api-22.0.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0bdb5dbfc9e2db695f0b83582855ef6c8d2ffb5bbc8664dbf6ff2f84e16ca07f
MD5 9eb23d9999d93f922da42da308bf7b77
BLAKE2b-256 a11dfbea6ac0edc0d001a2f01a17a1441e2158910b4e3935d1f7623aebec2031

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 887a1009aacb7a89ae43151c7a4b40418fccb1c6c5164d21301d897381b52873
MD5 1dc498cbc34fc1fa118ed050dbe7fb9e
BLAKE2b-256 02c26cdf2632da8e2d561bfdd3011c8a434f9ab5b54c7fe4c0ddc154465ba5db

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5daf11d3d39bf0380da88efcd82f3d061b1589dd0de15b051e694f47f88bcdfc
MD5 dce9e0f326b8ce1f0e47f063b24a6c70
BLAKE2b-256 c83fbd6b0538adccf0914926da1d91299dec39f2504114f6c9cc9b214ee31d31

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a4e27341c9dca9742333f82c4da38b3d65e594c86839a8f3f64e5621822768e9
MD5 e7b0780414c49c76348095f70ae58715
BLAKE2b-256 05109eb06daf0fabed1598418f8cd71cc822cf0daa04c703396b87dd495b6372

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 65ce935d15263e29ec00f61bab9b21386a08d9282d08d874ee654a5456ede1d8
MD5 5ef2138a19fd9f8c5f71a4396d64d9fe
BLAKE2b-256 5c224a622d2cc1b65f5baaa5f0a243ea27d29543025909315b03bf0c56d5e502

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f83dc5f9ad113fef5675d9e443c39ca9be560f8828422d7810767578a0d7d6e2
MD5 08c2fe94311f67edf436752e726b9ff3
BLAKE2b-256 43c8889c9859156dd82114306dddfef1c1de7329c65442b15472a848d78c8508

See more details on using hashes here.

File details

Details for the file lingo_api-22.0.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: lingo_api-22.0.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lingo_api-22.0.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 21711583cab2a50b9bf14aff9c0178bbd2c432dd257b3e6a050270555372c801
MD5 32c10729cda7efe14011d44da8a37bea
BLAKE2b-256 11e9f48cc312356bb409608cd360ef73d9fa3eb5866c0383da7971d615fc96ad

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