Reputation: 203
I am facing an error like below, while I have installed docplex module and am using python 3.7/3.8. Would you please help me?
Traceback (most recent call last):
File "C:/Users/xxx/PycharmProjects/pythonProject/EPC _LTC.py", line 155, in <module>
solution = mdl.solve(log_output=True)
File "C:\Users\xxx\PycharmProjects\pythonProject\venv\lib\site-packages\docplex\mp\model.py", line 4222, in solve
return self.fatal("CPLEX runtime not found: please install CPLEX or solve this model on DOcplexcloud")
File "C:\Users\xxx\PycharmProjects\pythonProject\venv\lib\site-packages\docplex\mp\model.py", line 894, in fatal
self._error_handler.fatal(msg, args)
File "C:\Users\xxx\PycharmProjects\pythonProject\venv\lib\site-packages\docplex\mp\error_handler.py", line 210, in fatal
raise DOcplexException(resolved_message)
docplex.mp.utils.DOcplexException: CPLEX runtime not found: please install CPLEX or solve this model on DOcplexcloud
Upvotes: 2
Views: 11126
Reputation: 311
docplex
is only the modeling layer - you need to install CPLEX separately.
If you can use the community edition, you can just pip install cplex
in your python environment. If you are using a commercial edition, you need to install the CPLEX python api as instructed here: https://www.ibm.com/docs/en/icos/20.1.0?topic=cplex-setting-up-python-api
Upvotes: 3