Saturday, February 11, 2017

Setting up CPLEX with Python

1. Get license for IBM ILOG CPLEX 12.7, download and install.
2. I use Python 3.5.3 .
3. Set environment path PYTHONPATH to the directory of the python cplex folder. In my case, it was C:\Program Files\IBM\ILOG\CPLEX_Studio127\cplex\python\3.5\x64_win64.
4. Run cmd as administrator. cd into the cplex folder. Run python setup.py install --home <directory to keep the cplex modules>. In my case, e.g:

From C:\Program Files\IBM\ILOG\CPLEX_Studio127\cplex\python\3.5\x64_win64:

...\> C:\Python35\python setup.py install --home C:\PythonCPLEX


Then run python, and import cplex.

Sauce(s) : The CPLEX Tutorial Setting up CPLEX with Python

No comments:

Post a Comment