无法在Python的Pulp上运行CPLEX

问题描述 投票:0回答:1

我正在尝试使用Pulp设置LP模型并使用CPLEX求解器对其进行求解。我在笔记本电脑上安装了带有许可证的CPLEX,但出现以下错误:

PulpSolverError: PuLP: cannot execute cplex.exe
python optimization linear-programming cplex pulp
1个回答
0
投票

确保cplex.exe位于您的PATH中(请参阅Adding directory to PATH Environment Variable in Windows)。

或者,您可以将cplex.exe的路径传递到CPLEX_CMD构造函数中(请参见source code

© www.soinside.com 2019 - 2024. All rights reserved.