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

lingo_api-21.0.11-cp312-cp312-win_amd64.whl (20.7 kB view details)

Uploaded CPython 3.12Windows x86-64

lingo_api-21.0.11-cp311-cp311-win_amd64.whl (20.6 kB view details)

Uploaded CPython 3.11Windows x86-64

lingo_api-21.0.11-cp310-cp310-win_amd64.whl (20.6 kB view details)

Uploaded CPython 3.10Windows x86-64

lingo_api-21.0.11-cp39-cp39-win_amd64.whl (21.1 kB view details)

Uploaded CPython 3.9Windows x86-64

lingo_api-21.0.11-cp38-cp38-win_amd64.whl (21.0 kB view details)

Uploaded CPython 3.8Windows x86-64

lingo_api-21.0.11-cp37-cp37m-win_amd64.whl (20.8 kB view details)

Uploaded CPython 3.7mWindows x86-64

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d965170e704facb327a997e402f44b53621a8d6c467324e090c21dfb8ff6c18d
MD5 57f9fb210bab57adac008f6119ad41e8
BLAKE2b-256 9bcaee0c880173a2c0359e3d1f4066d410b641740580f6d7647bc9f51b5cade5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 60fafc46c089dfc75236b3f9fc5cbaa8581deb6b09bafa8cc5d0862311291e5d
MD5 3473c839ca99184c919a784c2b6f0d66
BLAKE2b-256 837045b4d572e4ebcd14ba06ffd9efd42a5b9f88bf5231491bc5949fc87d37c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a931babb6cb1dc776f78c67df0d8692a46d67701e7f3de5c90a50de6a26653d0
MD5 67a130f477ad917d4ebbb5653cc68951
BLAKE2b-256 f68aef2303fde243ff59dde783a7dc6dff5542d2d9f08238cb9057a611ac7fc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lingo_api-21.0.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 21.1 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-21.0.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ee3670d1d391592dfb23822a97c97beb09d0d9415a7e589fab3af7c48f22c4bf
MD5 9bca25ae70306837250b3e87785ed8eb
BLAKE2b-256 720141371ebe7206a5c43371aeca4d320c35d92e5c621c255d71c53da9417beb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lingo_api-21.0.11-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 21.0 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-21.0.11-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1c897e2b4ff051ef49568203e9caad7ef376123d7bf64a131a65a5024dfebee9
MD5 af1b849ff77855981c64c8ef7c9d1699
BLAKE2b-256 477ddfcdc82a4f291debfedd7162661c60b3876ad1e5aae46354b06cfc00b6f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lingo_api-21.0.11-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 20.8 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-21.0.11-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9ef1626deac8768bb45be1d9fd392de156c4b6ed3e6b650d6e8d4bf0c291832d
MD5 10a8f92baecf35928d6d51664a5dff1c
BLAKE2b-256 cefe400a842bd1733687d663628dd89773bd887e6913ede3e5f2ef40541c4d48

See more details on using hashes here.

Supported by

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