Pulp.pulpTestAll() 测试失败,太多值无法解压

2024-04-28

我的操作系统是window 7,Pulp版本是1.6.1,gurobi版本是7.0.1。可以成功导入gurobipy。 Pull.solvers.GUROBI确实通过了测试,所以我可以使用gurobi。然而,pulp.solvers.CPLEX_CMD 失败了。这是错误消息:

pulp.pulpTestAll()
     Testing zero subtraction
     Testing inconsistant lp solution
     Testing continuous LP solution
     Testing maximize continuous LP solution
     Testing unbounded continuous LP solution
     Testing Long Names
     Testing repeated Names
     Testing zero constraint
     Testing zero objective
     Testing LpVariable (not LpAffineExpression) objective
     Testing Long lines in LP
     Testing LpAffineExpression divide
     Testing MIP solution
     Testing MIP solution with floats in objective
     Testing MIP relaxation
     Testing feasibility problem (no objective)
     Testing an infeasible problem
     Testing an integer infeasible problem
     Testing column based modelling
     Testing dual variables and slacks reporting
     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.PULP_CBC_CMD passed.
Solver pulp.solvers.CPLEX_DLL unavailable
     Testing zero subtraction
     Testing inconsistant lp solution
     Testing continuous LP solution
     Testing maximize continuous LP solution
     Testing unbounded continuous LP solution
     Testing Long Names
     Testing repeated Names
     Testing zero constraint
'_dummy'
('* Solver', <class pulp.solvers.CPLEX_CMD at 0x000000000B224CA8>,    'failed.')
Solver pulp.solvers.CPLEX_PY unavailable
Solver pulp.solvers.COIN_CMD unavailable
Solver pulp.solvers.COINMP_DLL unavailable
Solver pulp.solvers.GLPK_CMD unavailable
Solver pulp.solvers.XPRESS unavailable
     Testing zero subtraction
     Testing inconsistant lp solution
     Testing continuous LP solution
     Testing maximize continuous LP solution
     Testing unbounded continuous LP solution
     Testing Long Names
     Testing repeated Names
     Testing zero constraint
     Testing zero objective
     Testing LpVariable (not LpAffineExpression) objective
     Testing LpAffineExpression divide
     Testing MIP solution
     Testing MIP solution with floats in objective
     Testing MIP relaxation
     Testing feasibility problem (no objective)
     Testing an infeasible problem
     Testing an integer infeasible problem
     Testing column based modelling
     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.solvers.GUROBI passed.
     Testing zero subtraction
     Testing inconsistant lp solution
     Testing continuous LP solution
too many values to unpack
('* Solver', <class pulp.solvers.GUROBI_CMD at 0x000000000B224FA8>, 'failed.')
Solver pulp.solvers.PYGLPK unavailable
Solver pulp.solvers.YAPOSIB unavailable
Traceback (most recent call last):

  File "<ipython-input-21-94f8f423594d>", line 1, in <module>
    pulp.pulpTestAll()

  File "C:\Users\Guodong\Software\Anaconda2\lib\site-packages\pulp\pulp.py",     line 2283, in pulpTestAll
    raise PulpError("Tests Failed")

PulpError: Tests Failed

我遇到了同样的错误。这是 Gurobi_CMD 的问题。 Gurobi 通过了所有测试,但在 Gurobi_CMD 上失败了。

我通过卸载并重新安装 Gurobi,并更改 PuLP 的 .cfg 文件以正确指向 Gurobi 安装来解决此问题。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Pulp.pulpTestAll() 测试失败,太多值无法解压 的相关文章

  • Python正则表达式替换除特定单词之外的所有内容

    我正在尝试执行以下操作用正则表达式 import re x re compile going you words to replace s I am going home now thank you string to modify pri
  • Python argparse 作为函数

    以这种方式获取命令行参数有什么本质上的错误吗 我的意思是把参数解析放入它自己的函数中 它会被认为是非 Pythonic 或更严重吗 usr bin python import argparse def getArgs argv None p
  • 扭曲多种协议

    我希望为我正在从事的项目学习扭曲 该项目需要服务器响应 HTTP 请求以及通过 TCP 连接的其他协议 Twisted能够同时处理多种协议吗 我想使用 Twisted Web 来帮助处理 HTTP 但同时需要响应其他端口上的 TCP 连接
  • 如何在anaconda python 3.6上安装tensorflow

    我使用 anaconda 包安装了新版本的 python 3 6 但是我无法安装张量流 总是收到这样的错误 tensorflow gpu 1 0 0rc2 cp35 cp35m win amd64 whl 在此平台上不受支持 如何在 ana
  • 使用 Python 将列名称与 CSV 文件中的数据对齐

    这是我用来将数据写入 csv 文件的代码 with open temp csv a as fp a csv writer fp delimiter t data faceXpos faceYpos faceHeight faceWidth
  • 如何从 Windows 7 PC 上完全卸载 Python 2.7

    从这里安装了Python 2 7 https www python org downloads release python 279 https www python org downloads release python 279 然后我
  • 打开文件路径在 python 中不起作用[重复]

    这个问题在这里已经有答案了 我正在编写一个数据库程序 personica 是我的测试主题 我通常在文件路径的位置有一个变量 但出于测试和演示的目的 我只有一个字符串 在我的计算机上的这个确切位置有一个文本文件 顺便说一句 因为我很偏执 所以
  • python:numpy 运行脚本两次

    当我将 numpy 导入到 python 脚本中时 该脚本会执行两次 有人可以告诉我如何阻止这种情况 因为我的脚本中的所有内容都需要两倍的时间 这是一个例子 usr bin python2 from numpy import print t
  • 在 Python 中倾斜数组

    我有一个 2D 数组 我将使用它保存为灰度图像scipy misc toimage 在此之前 我想将图像倾斜给定角度 像这样进行插值scipy ndimage interpolation rotate 上图只是为了说明倾斜过程 我知道我必须
  • PyQt5 的 OpenGL 模块和版本控制问题(调用不正确的 _QOpenGLFunctions_(ver))

    我一直在努力得到PyQt5 helloGL 示例代码 https github com baoboa pyqt5 blob master examples opengl hellogl py编译 当我尝试构建解决方案时 我得到 Traceb
  • 如何检查discord.py中的所有者

    我试图让这个命令只有所有者才能运行它 是否有办法检查服务器的最高角色或创建者 我尝试了 commands is owner 但这仅检查某人是否是机器人的所有者 Guild owner https discordpy readthedocs
  • 如何在solidpython中设置特殊变量$fa、$fs、$fn

    in 上一个线程 https stackoverflow com questions 54040390 how to save data in stl file after python solid processing显示了如何通过 So
  • 在 Python 中通过网络发送对象的最佳方式是什么? [关闭]

    Closed 这个问题是基于意见的 help closed questions 目前不接受答案 我需要通过网络发送对象 我将使用 Twisted 并且我刚刚开始查看它的文档 据我所知 python实现套接字的唯一方式是通过文本 那么我如何使
  • Python 中的 Firebase 身份验证时出现 KeyError:“databaseURL”

    相信你做得很好 我是 firebase 的新手 正在尝试进行用户身份验证 我已经安装了pyrebase4并在firebase控制台上创建了一个项目 我还启用了使用 电子邮件和密码 登录并尝试连接我的应用程序 下面是我正在尝试的代码 impo
  • 获取列的 [0, x] 元素的最小值

    我需要计算一列 其中值是对其他列进行矢量化运算的结果 df new col df col1 min 0 df col2 然而 事实证明我不能像上面的语法一样使用 min 那么 获得 pandas 列的零和给定值之间的最小值的正确方法是什么
  • 如何动态选择要在flask中使用的模板目录?

    默认情况下 Flask 使用存储在 template 目录中的模板文件 flaskapp application py templates hello html 有没有办法根据登录的用户动态选择模板目录 这就是我想要的目录结构 flaska
  • 如何将动态数据传递给装饰器

    我正在尝试编写一个基本的 CRUD 控制器类来执行以下操作 下列的 class BaseCrudController model field validation template dir expose self template dir
  • 如何使用 PySpark 预处理图像?

    我有一个项目 需要为 1 设置大数据架构 AWS S3 SageMaker 的概念验证使用 PySpark 预处理图像 2 执行 PCA and 3 训练一些机器或深度学习模型 我的问题是了解如何使用 PySpark 操作图像数据 但无法在
  • 如何通过解析导入来组合并获取单个 Python 文件

    我正在尝试获取单个 Python 文件作为输出 我有一个 Python 脚本 其中有多个此类导入 from that import sub 导入来自所有本地模块 而不是来自系统或 Python 库 有什么方法可以解决这些问题并获得一个完整的
  • 我可以以某种方式“编译”一个Python脚本以在没有安装Python的PC上运行吗?

    所以我有一个Python脚本 myscript py 我是这样执行的 python D myscript py 但是 我必须安装 Python 并将其包含在PATH使其工作的环境变量 是否有可能以某种方式将 Python 可执行文件与 Py

随机推荐