如何在 Ubuntu 中安装 pyomo compute_canonical_repn?

How to install pyomo compute_canonical_repn in Ubuntu?

Pyomo 版本 - 5.6.1
python - 2.7

我完全不熟悉 Ubuntu,如何安装 pyomo compute_canonical_repn?

我在导入时遇到错误 compute_canonical_repn

from pyomo.repn.compute_canonical_repn import preprocess_constraint

错误:- 没有名为 compute_canonical_repn

的模块

我没有找到任何具体的安装步骤

仅供参考,相同的模块在我的 windows 机器上运行 pyomo 版本 5.2

你试过了吗pip install pyomo

Reference

根据您的评论回复,这不是 pip install pyomo 命令的问题。 您希望能够使用已移至 pyomo.repn.standard_repn.

preprocess_constraint