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 LINGO_20_HOME="/opt/lingo20" ` For standard (non-administrative) users: ` $ export LINGO_20_HOME="~/lingo20" `
LINGO 19 ` $ export LINGO_19_HOME="/opt/lingo19" ` For standard (non-administrative) users: ` $ export LINGO_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file lingo-api-20.0.8.tar.gz
.
File metadata
- Download URL: lingo-api-20.0.8.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7363a6414824590c348ad4639758e2a98223e98434b9f45bda072f0dac9be0d |
|
MD5 | 2e0d75367e1d191796992e168c485585 |
|
BLAKE2b-256 | dfbcc3c68751b26eaf36059a1dae86240fc91f1d901aca45456076e48a2f46c3 |
File details
Details for the file lingo_api-20.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lingo_api-20.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c399819f8c863b32fa06e7642e06e8eb50eb49746ad5171f9b92e18edf60cf6a |
|
MD5 | 73064532bf2bf932188f61113fa9f12c |
|
BLAKE2b-256 | a981d629c33d3c0ba49e179d71144d804c54f82543a9d22f018aed7c854b0433 |
File details
Details for the file lingo_api-20.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lingo_api-20.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39399031acd9a32c7da318f83c9f27e00837164fc6781a52d90b94af9ab2648c |
|
MD5 | 9b25a4c44134b1a45a643ca73f78967c |
|
BLAKE2b-256 | d0dcbb7650849f6b665181c0a0e2f271dbd93affbf15e654a61dd90a2316cc4e |
File details
Details for the file lingo_api-20.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lingo_api-20.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94205181db83e34a3c597b3880d8940fabb828439fabe960c468d331fab9f6e7 |
|
MD5 | 53d851010ffecec859adca239d5a019f |
|
BLAKE2b-256 | 73a89edee2f7f98f5c2a88061324a9edf8cf407bc250e82c5ca1d06cbbc3bc2e |
File details
Details for the file lingo_api-20.0.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lingo_api-20.0.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.4 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7ceb9e4f51b7ddfeb7d59fa0565b2847a04148a4ff2a4b02eff2d5ebe13e297 |
|
MD5 | 187145381098655548afd8972e9a57bf |
|
BLAKE2b-256 | 0a002bba56111560f3191e947b83f4769cb717b204ee6cd9a01496e33beb2d9e |