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 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 `

For standard (non-administrative) users:

`bash > pip install lingo_api --user `

## Installation For LINGO 19

This python package can be installed with pip. It is assumed Lingo 19 is installed on host system.

For administrative users:

`bash > pip install lingo_api==19.0.6 `

For standard (non-administrative) users:

`bash > pip install lingo_api==19.0.6 --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 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" `

LINGO 19 on windows 64-bit `dos > setx LINGO64_19_HOME "C:\path\to\LINGO64_19" ` LINGO 19 on windows 32-bit `dos > setx LINGO_19_HOME "C:\path\to\LINGO19" `

### Using Linux On the command line depending on the users LINGO installation:

LINGO 20 For administrative users: ` $ export LINGO64_20_HOME="/opt/lingo20" ` For standard (non-administrative) users: ` $ export LINGO64_20_HOME="~/lingo20" `

LINGO 19 ` $ export LINGO64_19_HOME="/opt/lingo19" ` For standard (non-administrative) users: ` $ export LINGO64_19_HOME="~/lingo19" `

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-20.0.1-cp310-cp310-win_amd64.whl (19.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

lingo_api-20.0.1-cp310-cp310-win32.whl (19.1 kB view details)

Uploaded CPython 3.10 Windows x86

lingo_api-20.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lingo_api-20.0.1-cp39-cp39-win_amd64.whl (19.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

lingo_api-20.0.1-cp39-cp39-win32.whl (19.1 kB view details)

Uploaded CPython 3.9 Windows x86

lingo_api-20.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lingo_api-20.0.1-cp38-cp38-win_amd64.whl (19.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

lingo_api-20.0.1-cp38-cp38-win32.whl (19.1 kB view details)

Uploaded CPython 3.8 Windows x86

lingo_api-20.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lingo_api-20.0.1-cp37-cp37m-win_amd64.whl (19.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

lingo_api-20.0.1-cp37-cp37m-win32.whl (19.1 kB view details)

Uploaded CPython 3.7m Windows x86

lingo_api-20.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6b91c29f81078e34dd51a80a0dff1d04478b449807633e50165a8b985429be70
MD5 4e8f43fdce76d0d911667828b3a3aa1a
BLAKE2b-256 893911a55ec7515bd0b5fdf4c854a8cb32e5fe6f7a5f9ce5beab3859ef1c82ab

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp310-cp310-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 50d0ce009eb788a393675bf75215e0181b3105351ca218d228183e460405b702
MD5 2c3c3a64984793efbba06452e8ec1069
BLAKE2b-256 f176bc89a71677fcd1250b5cddc6f7c251b93a229986699c8a3b962c10ac61c9

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26cb0cf58e83fabaf7b03a676835937c07c6625acbd8e1715c256f15176603f1
MD5 9fc8650e6df0679c138434b5f748f990
BLAKE2b-256 a9435a355fb2df62afcf915e12a6f4251f1aa421d47793afb521e5ea49db5ce9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5f3b93df7764bd9b09d1d98431e60bf443fd1180a65e5234dab2014c51c3d4ab
MD5 2d8bfac39ecd4bcd66fd05e985b76a2f
BLAKE2b-256 e2f69acff71f315c386eb1022e3588c6d0c2ef0259bc0e6900bb3e884edf43fc

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp39-cp39-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 118b17d7fbc1a83372b136aa3656213608a61eb936558743e692690a42df9205
MD5 2e6d8c51ce5d7b34cf9ad32f06d97b0c
BLAKE2b-256 d32007b014fed89cf46dcbc3685cdb01799370e96b3cd731f4817ba6fa0e6fe8

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 51155036804c81a0c77bc65d3d1f830fd98e434d19a3ce350e2ce57f64e05a77
MD5 4f26d53727c85a0d1de747c1bd945086
BLAKE2b-256 3054cc1c85b5b2392eb71fae27e3926ceb7fb166951f8aa9d6ebfcd8168da14e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1147e973abcdb6702c01a93f2c7779b579c5d222ae524b02d8a8411953ee2a5f
MD5 d7921dd254a38a3b5187f421eaaff7cc
BLAKE2b-256 af32c123e686f7bcd9aa49e62419204c9e91e08bc308fabf049c287fdf7416fb

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp38-cp38-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 54b041cc60eeae2b5e7e1146d42c4517cbd694fb60eff0029a46b39a7c428eaf
MD5 075bac77c79205fc26f8d34e4e94b465
BLAKE2b-256 7b10eef68d99272641bb573f7fe244716ee35d85b79ceec1b2c88984100bc45d

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0ea9e03f0bd5410d686927bd9c37b41b4700752d5c9fdde85469da7f6a79928
MD5 84532da85b553b1ce2eac02a276bc5be
BLAKE2b-256 83c65f1917a8570ea4f07e9260d4cefe8330229e145e311440039f5c2e40347f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 aa398c725648a20de520a29b038ee5566b6b699479fd2628fd581ed932e0107a
MD5 c302e68868ae75ada9969635444762e3
BLAKE2b-256 2772311092065d5e3458a55da110e667ea455b1b91bc8365f089c053d40aad37

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp37-cp37m-win32.whl.

File metadata

  • Download URL: lingo_api-20.0.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for lingo_api-20.0.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 0fa5368c75af4aa2f1d3ae8d96aa55ee7c00bd21a0a1527d769bc86b8f34643c
MD5 f9ffca57316c43154ab0bffe41ded294
BLAKE2b-256 51cb82aee96f69b3105a5f1e8fe2cfda94de1f6f1f13c84143550f924ddcb6a7

See more details on using hashes here.

File details

Details for the file lingo_api-20.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lingo_api-20.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee40482ccb2a3474fb61c23e62b9ceb84b32eed2e2fbf01c3dd9ad451d27b5a8
MD5 968b30f90bcc4ece7553f043980af5fc
BLAKE2b-256 ee68f88e4852316ef33e7dc383a6a5017d0d56d5f54f682c42a10ba7c7d0821d

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