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
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 Distributions
Built Distributions
File details
Details for the file lingo_api-21.0.7-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: lingo_api-21.0.7-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 20.2 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0701dfa938533d6d29edf566d36bfe70f0a6b90efa2030cac81844fd79ffa6d9 |
|
MD5 | 11eb43f25f20f200bc3f16118f27ea4f |
|
BLAKE2b-256 | c6b2fafa991a831024c5527b1ca6efc94e0d89d71de39524513a357f18e9b28d |
File details
Details for the file lingo_api-21.0.7-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: lingo_api-21.0.7-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d78cb3c9ed3acd4617b71234e3262cad60c2edd7a7b160f2d1a7324186ffa515 |
|
MD5 | 01e96ac48241ff502a344569aa3a21b3 |
|
BLAKE2b-256 | 5169e1e640857696e85ff01afe868dac1227198a60300350a79ae13c19f9d3c5 |
File details
Details for the file lingo_api-21.0.7-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: lingo_api-21.0.7-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c18fb6d0384f84d89df50a9f03ef2d971787a643f579bc39113f49bf6c87de6 |
|
MD5 | 224e3ae86929d1e3ecc6050c2c798105 |
|
BLAKE2b-256 | c74b09f0c3c7d7a37b93054fda189ff2a8f2f4a2d2cc69594361afb0e1544e52 |
File details
Details for the file lingo_api-21.0.7-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: lingo_api-21.0.7-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 20.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8ffa421b6e9d3140529d210d9c87cdb6cd43bc194859150ca278f2453ad511c |
|
MD5 | 6ba8ba29be681f6e12070894e99f1774 |
|
BLAKE2b-256 | 0ebf579673bce3a88d15a67be33a652652de1de101f28b9c9ed0bfa9f958ef1e |
File details
Details for the file lingo_api-21.0.7-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: lingo_api-21.0.7-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 20.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f1e58fa2227601f4918623106d20920f64f6f8955c6250ddb0e45883bfb587d |
|
MD5 | 00f6fb9908eb7c9786e4a304347a8cc6 |
|
BLAKE2b-256 | bf75da948d83e1d7121427b691113d709c95fbfc9e2b9ec08841d500c3950b90 |
File details
Details for the file lingo_api-21.0.7-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: lingo_api-21.0.7-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 20.6 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 578a4c7329c989d6d5d2bb8ae56160768f5d84429f53f55af495ce2bbffade18 |
|
MD5 | 15d05682ccb3023a4c56de7542fac9ad |
|
BLAKE2b-256 | b663d95495626bdc08754b3478f235a7d720124c275bb7bc96c7111286166c9d |