接收AttributeError:“非类型”对象在使用纸浆时没有属性“actualSolve”

2024-10-06 12:29:57 发布

您现在位置:Python中文网/ 问答频道 /正文

当我试图使用Pulp在Jupyter笔记本上绘制线性规划方程时,我遇到了这个错误

AttributeError: 'NoneType' object has no attribute 'actualSolve'

背景: img


Tags: noobject错误绘制笔记本jupyterattributepulp
1条回答
网友
1楼 · 发布于 2024-10-06 12:29:57

由于某些原因,使用easy_install安装纸浆时未安装默认解算器。我必须使用pip uninstall pulp卸载纸浆,然后使用pip install pulp重新安装 使用以下命令查看是否安装了任何解算器

import pulp as pl
solver_list = pl.listSolvers(onlyAvailable=True)

相关问题 更多 >