无法在Python的Pulp上运行CPLEX [英] Unable to run CPLEX on Pulp in Python
本文介绍了无法在Python的Pulp上运行CPLEX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用Pulp设置我的LP模型并使用CPLEX求解器对其进行求解。
我在笔记本电脑上安装了带有许可证的CPLEX,但出现以下错误:
I am trying to use Pulp to setup my LP model and solve it using CPLEX solver. I have CPLEX installed with license on my laptop but getting the below error :
PulpSolverError: PuLP: cannot execute cplex.exe
推荐答案
请确保 cplex.exe
在您的 PATH
中(请参见将目录添加到Windows中的PATH环境变量)。
Make sure that cplex.exe
is in your PATH
(see Adding directory to PATH Environment Variable in Windows).
或者,您可以将 path
参数设置为该位置 CPLEX_CMD
构造函数中的 cplex.exe
的信息(请参见源代码)。
Alternately, you can set the path
argument to the location of cplex.exe
in the CPLEX_CMD
constructor (see the source code).
这篇关于无法在Python的Pulp上运行CPLEX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文