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.9-cp312-cp312-win_amd64.whl (20.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

lingo_api-21.0.9-cp311-cp311-win_amd64.whl (20.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

lingo_api-21.0.9-cp310-cp310-win_amd64.whl (20.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

lingo_api-21.0.9-cp39-cp39-win_amd64.whl (21.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.7m Windows x86-64

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c873671c56c8341ffb769f63f9895c7a0b3e860663e01f5fe0326a501f33b81a
MD5 49c2a6875812cb18d8f21293dc798b77
BLAKE2b-256 51e2dac9701e81d9151a3bb06e7157e48464474addaa2da9fad608fb30fbee02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f797221d8e58c514a6a4ec185ed4ab32890de6eabebd293a7f971448db99e30a
MD5 b52245d36ade91251f61b6321675b444
BLAKE2b-256 3f0f401fd1eef8ab59f25943e872f9a8862d216a38a2231b053e8b1396377a65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b8b7f1c7aa4a2f68bf6dd385b41f31aff9576fbc422f2139122cfdb605796ef2
MD5 af46f1653f9d96b0876eb49f678c36ef
BLAKE2b-256 5154a7f09c3931b7c5e8cbd8f9adff0d995383c6790f28af6f907f73bcf025fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5a923fb655678555cab60b70802ce40bbbe7908d2d4f48bdad4dc58fa05cc988
MD5 7a2482968787b6171e4cfdb2e99dc666
BLAKE2b-256 d702e6838b71cb610f1c460385f417575650036b0527275912f19cd04b61bf8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 160b24d02d23710faa7d43c1d75c5ba915f34b7a5eaab5e8fc1bb1b88e679232
MD5 de2013575a25b908c088ef2621b40aaf
BLAKE2b-256 f0f5a6253df2b63475fe65335b3cf2a48a56f681e68e0d6a2d7797e9899c7d2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 61aa8fe5097c26364e31a8a43709bdc530d01310030f3916ec05717421dec133
MD5 600a0ce968214f55c441808c3bcfd50c
BLAKE2b-256 c2e6553f0dc879b4d42af239323c9af7584ba7020d83dcf41f61f4e1c5861fa5

See more details on using hashes here.

Supported by

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