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

Uploaded CPython 3.12 Windows x86-64

lingo_api-21.0.8-cp311-cp311-win_amd64.whl (20.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

lingo_api-21.0.8-cp310-cp310-win_amd64.whl (20.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

lingo_api-21.0.8-cp39-cp39-win_amd64.whl (20.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

lingo_api-21.0.8-cp38-cp38-win_amd64.whl (20.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

lingo_api-21.0.8-cp37-cp37m-win_amd64.whl (20.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f0fd4b508ff57c95229e994a0d436e4be95ee7a5499c6e9b89cbbfdff3c80906
MD5 0c8d770154ad2b9987d46550fb115a0b
BLAKE2b-256 4c8d33c8f3ef1e2520336d4e8952a28104204482c108091ebb0e33bbd4a99c76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c9339225e468a7b9f72a71452838c42416f317cee560177012f85207e44dbf33
MD5 daf56c26c3f8b617b83958cc61939085
BLAKE2b-256 72a38a14f43777753335bc67739789c1d677a72dd76cd3c2096619060e6c6e9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3ed5bd85cc6324de735ba449f9efdaa440653a23f481190d82de8b9481d6a03a
MD5 e48bae5189c93b1aecb7f612b3afb165
BLAKE2b-256 cb3d1b5408f64b422e9ee2e44fc225ac50364a5ae318594814fd51adff602671

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 47768c758ac8b7f14e2f83d895e0157978986b15b8d1966cd8bbd08627661f6d
MD5 9357398868e857a913f29aa04457f732
BLAKE2b-256 94d951281206ea9015e57c62e2689a11db620b78baa5c57b7c957125987caae4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bf412a91a0f18081e58730a673f04c87205a604f73e2ad64e383e3c07c0c3abc
MD5 0dd6b54c4dea495bd9d9eb189fc930d9
BLAKE2b-256 3fd754012ad88b3da43f7a06ac5d59e3c430cd1c75844db0f8d1bd729549148f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-21.0.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e7832b33cc4f69fbc254d83360a26dadaf57dcfbbad1eede4a691c55e555cac6
MD5 338bde9c44a39e0e1cc5665faa763099
BLAKE2b-256 82f507930dbc6ca5dec9c9ffc39a789df77653f248362798761f2d4ded34fb40

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