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.2-cp313-cp313-manylinux_2_34_x86_64.whl (37.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

lingo_api-22.0.2-cp312-cp312-manylinux_2_34_x86_64.whl (37.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

lingo_api-22.0.2-cp311-cp311-manylinux_2_34_x86_64.whl (37.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

lingo_api-22.0.2-cp310-cp310-manylinux_2_34_x86_64.whl (37.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

lingo_api-22.0.2-cp39-cp39-manylinux_2_34_x86_64.whl (37.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

lingo_api-22.0.2-cp38-cp38-manylinux_2_34_x86_64.whl (37.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for lingo_api-22.0.2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a9c23cefc500f308e78563af65569ec3955db87661205b648fa09766aff36889
MD5 fabc0871aef5f689593d742d469b1898
BLAKE2b-256 793ef33a88afcd4f79eac4a774dbb31a56680f7c5c5edf4a4f9db3da8f5a21e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-22.0.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5b7181b85066a06db9e98b2f25caa5ea3a9f30dbb901153cc464cf72f5d6a088
MD5 c5e88d15c1bcf951182aa63a31659543
BLAKE2b-256 f1a23129dcf1a15d9166999b8e4429d54878245bc762961576903117b51e4c15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-22.0.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9c4db2272e39fe8d15672893dbaab74f27a0e06a22f4dd0bf41588e8d267bf9e
MD5 b67070295accd947e751528254ed7968
BLAKE2b-256 898c98167b8bb4a1c20e99fc479bde1cfdd547f62ea2d4757ea85e32ecb3eccd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-22.0.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 463890422cc2f06819cf79f0fd3dc7de722c44d179c0292a830bded8f7ccaf8d
MD5 4dca30ff16ea4dcb7e6ee6e6708c6295
BLAKE2b-256 8c23b5ad1d54d5d4ba888cfc7438fd2e8498a119f19e7919d934f9b3a1071318

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-22.0.2-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2d6abf12d16c3e3b202b6cd207b68628320474d941f2b1bd3335788cd07c5d10
MD5 f3bb412f889ee1a31a010f34ef59649c
BLAKE2b-256 a9efdd7ecfde9b8364812bcab21a97a3f3f188f849c36be21181c123c20973c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-22.0.2-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 20feeb2fbffe63340ce538d3d0eeeb44124b89ba85a59c77e66e42d7f7fbb74d
MD5 94412cf0d458748977f43f6778f804be
BLAKE2b-256 850205d931ff979bb780e508f8250bf7fd488fb88d158e8043d149c20c8fe7b9

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