gpt4 book ai didi

python - 测试 PuLP 安装失败

转载 作者:太空狗 更新时间:2023-10-30 00:15:27 27 4
gpt4 key购买 nike

遵循 http://www.coin-or.org/PuLP/main/installing_pulp_at_home.html#installation 的说明,我使用“Windows 从源安装”安装了 PuLP

当我尝试在页面上运行测试时(页面上的说明:“要测试您的 PuLP 安装是否正常工作,请在 python 解释器中键入以下内容并注意输出应该类似。下面的输出如果您没有安装任何其他求解器和与 pulp works 捆绑的 CoinMP 求解器,这就是您所期望的。”)

我的结果:

import pulp pulp.pulpTestAll() Solver pulp.solvers.CPLEX_DLL unavailable. Solver pulp.solvers.CPLEX_CMD unavailable. Solver pulp.solvers.COIN_CMD unavailable. Solver pulp.solvers.COINMP_DLL unavailable. Solver pulp.solvers.GLPK_CMD unavailable. Solver pulp.solvers.XPRESS unavailable. Solver pulp.solvers.GUROBI unavailable.

根据网页,这应该是我的输出:

import pulp pulp.pulpTestAll()
Solver pulp.pulp.COIN_MEM unavailable. Solver pulp.pulp.COIN_CMD unavailable. Testing continuous LP solution Testing maximize continuous LP solution Testing unbounded continuous LP solution Testing MIP solution Testing MIP relaxation Testing feasibility problem (no objective) Testing an infeasible problem Testing an integer infeasible problem (Error to be fixed) Testing column based modelling Testing column based modelling with empty constraints Testing dual variables and slacks reporting Testing resolve of problem Testing Sequential Solves Testing fractional constraints Testing elastic constraints (no change) Testing elastic constraints (freebound) Testing elastic constraints (penalty unchanged) Testing elastic constraints (penalty unbounded) * Solver pulp.pulp.COINMP_DLL passed. Solver pulp.pulp.GLPK_MEM unavailable. Solver pulp.pulp.GLPK_CMD unavailable. Solver pulp.pulp.XPRESS unavailable.

我在 Windows 7 64 位上使用 Python 2.7.1、PuLP 1.4.7。

我猜这是因为与 PuLP 捆绑在一起的 CoinMP 求解器无法正常工作。我一周前才开始使用 Python,我只是编程方面的业余爱好者。

最佳答案

Afaik 你需要安装任何支持的求解器,例如

sudo aptitude install glpk

sudo aptitude install coinor-libcbc0

刚刚在 (K)ubuntu 11.10 上测试并获得

Solver pulp.solvers.PULP_CBC_CMD unavailable.
Solver pulp.solvers.CPLEX_DLL unavailable.
Solver pulp.solvers.CPLEX_CMD unavailable.
Testing zero subtraction
Testing continuous LP solution
Testing maximize continuous LP solution
Testing unbounded continuous LP solution
Testing Long Names
Testing repeated Names
Testing MIP solution
Testing MIP relaxation
Testing feasibility problem (no objective)
Testing an infeasible problem
Testing an integer infeasible problem
Testing column based modelling
Testing fractional constraints
Testing elastic constraints (no change)
Testing elastic constraints (freebound)
Testing elastic constraints (penalty unchanged)
Testing elastic constraints (penalty unbounded)
* Solver pulp.solvers.COIN_CMD passed.
Solver pulp.solvers.COINMP_DLL unavailable.
Testing zero subtraction
Testing continuous LP solution
Testing maximize continuous LP solution
Testing unbounded continuous LP solution
Testing Long Names
Testing repeated Names
Testing MIP solution
Testing MIP relaxation
Testing feasibility problem (no objective)
Testing an infeasible problem
Testing an integer infeasible problem
Testing column based modelling
Testing fractional constraints
Testing elastic constraints (no change)
Testing elastic constraints (freebound)
Testing elastic constraints (penalty unchanged)
Testing elastic constraints (penalty unbounded)
* Solver pulp.solvers.GLPK_CMD passed.
Solver pulp.solvers.XPRESS unavailable.
Solver pulp.solvers.GUROBI unavailable.
Solver pulp.solvers.PYGLPK unavailable.
Solver pulp.solvers.YAPOSIB unavailable.

第一个

关于python - 测试 PuLP 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6471367/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com