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 [Lingo user manual](https://lindo.com/downloads/PDF/LINGO.pdf) for installation instructions, and to learn more about the Lingo modeling language.

## Installation

This python package can be installed with pip

For administrative users:

`bash > pip install lingo_api==19.0 `

For standard (non-administrative) users:

`bash > pip install lingo_api==19.0 --user `

## Testing

A quick way to test the installation is to run `bash > python -m lingo_test `

You can also try out the samples by ` > python examples/CHESS/chess.py `

## Possible errors due to misconfiguration

You may get the following error if your LINGO_19_HOME environment variable is not set up.

` Error: Environment variable LINGO_19_HOME should be set `

To fix the problem follow these steps

### Using Windows On the command line for windows 64 `dos > setx LINGO_19_HOME "C:\LINGO64_19" ` ### Using Linux On the command line

For administrative users: ` $ export LINGO_19_HOME="/opt/lingo19" ` For standard (non-administrative) users: ` $ export LINGO_19_HOME="~/opt/lingo19" ` To have this variable set automatically, add the above line to your ~/.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 you 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-19.0.1-cp310-cp310-win_amd64.whl (16.5 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

lingo_api-19.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lingo_api-19.0.1-cp39-cp39-win_amd64.whl (16.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

lingo_api-19.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lingo_api-19.0.1-cp38-cp38-win_amd64.whl (16.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

lingo_api-19.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lingo_api-19.0.1-cp37-cp37m-win_amd64.whl (16.5 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

lingo_api-19.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view hashes)

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

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