docplex.mp.utils.DOcplexException: Cannot solve model: no CPLEX runtime found.
Closed this issue · 4 comments
Hi
This is the first time I use github.
I am trying to follow the example in this page
but I cannot get the output correctly and got an error message of
docplex.mp.utils.DOcplexException: Cannot solve model: no CPLEX runtime found.
and
-- cannot find parameters matching version: , using: 20.1.0.0
additional info: I use pycharm and the python version is 3.8
Can anyone else please pinpoint the misstep I took? thanks
Regards
Louis
Hello, you need to have a CPLEX runtime in the PYTHONPATH. It should be something like CPLEX_Studio201/cplex/python/3.8/x86-64_osx (check your cplex version and platform).
or use the setup.py to copy it in your python libraries.
Thanks vberaudi. i found that it requires me to install cplex also but not just docplex. it successes now.
indeed, what are the differences between them?
The CPLEX module contains the engine written in C which solves the model written via arrays of coefficients, values, indexes. It also contains a python layer also "matrix oriented" in the sense that you create also the model via lists of coefs, values, indexes to define the matrix.
The docplex is a pure modeling layer where you "write" constraints with mathematical operators, aggregated sums, ... relying on the previous module and hiding all those lists.
It offers an easier way to manipulate a model, its solution, interact with the engine...
thanks for the clarification. i will close this thread as well.