cplex
A Python interface to the CPLEX Callable Library, Community Edition.
What it is and what it does
cplex is a Python binding to IBM ILOG CPLEX Optimization Studio's Callable Library, specifically the free Community Edition. It lets you formulate and solve linear, quadratic, and mixed-integer optimization problems directly from Python, suitable for both interactive exploration and production scripts. The package ships as pre-built wheels for modern Python versions across macOS, Linux, and Windows, with no additional runtime dependencies.
The library is maintained actively and has been available since 2018. It is proprietary software under IBM's non-warranted license, which permits free use of the Community Edition but restricts reverse engineering, sublicensing, and imposes key-based usage limits. Developers should carefully review the license terms to confirm the edition meets their use case, as the Community Edition may have solver limits or restrictions on commercial deployment.
Use it for:
- Solve linear programming problems like resource allocation, production planning, or network flow optimization.
- Formulate and solve mixed-integer programs for scheduling, routing, or combinatorial optimization tasks.
- Prototype optimization models interactively in Jupyter notebooks before moving to production solvers.
- Integrate optimization into larger Python applications that require mathematical programming capabilities.
- Benchmark or compare optimization approaches using CPLEX's solver engine from Python.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python interface to IBM CPLEX's optimization solver, enabling linear, quadratic, and mixed-integer programming from Python code.
Yes, if you need CPLEX's solver from Python and accept the Community Edition's licensing terms and potential usage limits. The package is actively maintained, has no external dependencies, and installs cleanly on supported Python versions. However, verify that the Community Edition's restrictions (key limits, possible performance caps, commercial use terms) align with your project before committing to production use.
Install
cplex on PyPI
pip
pip install cplexuv
uv add cplexpoetry
poetry add cplexInstalling cplex
Before you install
Medium install friction due to pre-built wheels for specific Python versions and platforms. Active maintenance with a release 30 days ago. No runtime dependencies to manage.
License in practice
Licensed under IBM's proprietary International License Agreement for Non-Warranted Programs. Community Edition is free but subject to IBM's terms, including restrictions on reverse engineering, sublicensing, and key-based usage limits. Review the full license terms before deployment.
Quickstart
pip install cplex==22.2.0.1
import cplex
c = cplex.Cplex()
c.objective.sense = c.objective.sense.minimize
Requires Python >=3.10. Community Edition may have usage or performance restrictions; verify licensing terms before production deployment.
Verify before relying
- Whether Community Edition license permits commercial or production use without additional registration
- Performance characteristics and solver limits specific to the Community Edition
- Whether the package requires a separate CPLEX installation or is fully self-contained
- Exact Python version range supported (requires_python specifies >=3.10 but wheel evidence shows cp310–cp313)
Package facts
| License | Proprietary (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 30 days since the last release |
| First released | |
| Downloads | 83,199/month — #14,094 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cplex-22.2.0.1-cp310-cp310-macosx_11_0_arm64.whl; cplex-22.2.0.1-cp310-cp310-manylinux2014_aarch64.whl; cplex-22.2.0.1-cp310-cp310-manylinux2014_ppc64le.whl; cplex-22.2.0.1-cp310-cp310-manylinux2014_x86_64.whl; cplex-22.2.0.1-cp310-cp310-win_amd64.whl; cplex-22.2.0.1-cp311-cp311-macosx_11_0_arm64.whl; cplex-22.2.0.1-cp311-cp311-manylinux2014_aarch64.whl; cplex-22.2.0.1-cp311-cp311-manylinux2014_ppc64le.whl; cplex-22.2.0.1-cp311-cp311-manylinux2014_x86_64.whl; cplex-22.2.0.1-cp311-cp311-win_amd64.whl; cplex-22.2.0.1-cp312-cp312-macosx_11_0_arm64.whl; cplex-22.2.0.1-cp312-cp312-manylinux2014_aarch64.whl; cplex-22.2.0.1-cp312-cp312-manylinux2014_ppc64le.whl; cplex-22.2.0.1-cp312-cp312-manylinux2014_x86_64.whl; cplex-22.2.0.1-cp312-cp312-win_amd64.whl; cplex-22.2.0.1-cp313-cp313-macosx_11_0_arm64.whl; cplex-22.2.0.1-cp313-cp313-manylinux2014_aarch64.whl; cplex-22.2.0.1-cp313-cp313-manylinux2014_ppc64le.whl; cplex-22.2.0.1-cp313-cp313-manylinux2014_x86_64.whl; cplex-22.2.0.1-cp313-cp313-win_amd64.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
docplexModeling library for building and solving…
permissive · top 15,000 on PyPI
gurobipygurobipy is a Python interface to the Gurobi…
unclear · top 5,000 on PyPI
mipPython MIP models and solves mixed-integer…
copyleft · top 15,000 on PyPI
optlangOptlang formulates and solves linear,…
permissive · top 15,000 on PyPI
PuLPPuLP is a linear and mixed-integer programming…
permissive · top 5,000 on PyPI
amplpyamplpy is a Python interface to AMPL, an…
permissive · top 15,000 on PyPI
daqpDAQP is a dual active-set solver for convex…
permissive · top 15,000 on PyPI
MosekMOSEK solves large-scale convex and…
unclear · top 15,000 on PyPI
gekkoGEKKO is a Python package for optimization and…
permissive · top 15,000 on PyPI
pyghidraPyGhidra provides native CPython 3 access to…
permissive · top 15,000 on PyPI