At first, I thought you were trying to use the CPLEX_CMD solver, but I see that you want to use CPLEX_PY instead. The former relies on the CPLEX interactive (cplex.exe
) being in your PATH
environment variable. The later requires that you either install the CPLEX Python API or include it in your PYTHONPATH
environment variable. Please see the documentation here for setting up the CPLEX Python API.
Based on what you have in your question, you could run setup.py
like so:
cd "C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129\cplex\python\3.7\x64_win64"
python setup.py install
Or, you could add the following to PYTHONPATH
:
C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129\cplex\python\3.7\x64_win64
See how to do this here.
In any case, you need to make sure that you can do the following from the python prompt:
>>> import cplex
Also, make sure you are using a 64-bit python.