Accessing the module cplex

Invoke CPLEX in a Python session.

After you have installed the CPLEX Python API on your system, you access CPLEX from the Python programming language through the cplex module. To do so, you may use any of the following commands either from a script written in the Python programming language or from within the Python interpreter:

import cplex

or

from cplex import *

or

import cplex as NAME

where NAME is any Python name of your choice.