在 ubuntu 中安装 Ipopt 求解器以与 Pyomo 一起使用 [英] Install Ipopt solver to use with Pyomo in ubuntu

查看:46
本文介绍了在 ubuntu 中安装 Ipopt 求解器以与 Pyomo 一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何安装 ipopt 求解器以在 ubuntu 中与 pyomo 一起使用???我已经下载了 ipopt

How can I install ipopt solver to use it with pyomo in ubuntu??? I have already download the zip file of ipopt

但我没有找到任何具体说明如何安装它并将其与 pyomo 一起使用.

but I don'n find any specific instructions how to install it and use it with pyomo.

推荐答案

如果您下载了二进制文件,那么您只需确保 ipopt 可执行文件位于您的 PATH 环境变量中.如果您尝试从源代码安装,则应按照此处的说明进行操作.您的最后一个选择是使用 anaconda 使用以下命令安装 ipopt 二进制文件:

If you downloaded a binary then you just have to make sure that the ipopt executable is in your PATH environment variable. If you are trying to install from source code you should follow the instructions here. Your last option is to use anaconda to install an ipopt binary using the command:

conda install -q -y --channel cachemeorg ipopt_bin

我认为 conda 安装了旧版本的 ipopt,所以请注意.

I think conda installs an old version of ipopt so be aware.

当您在终端窗口中键入 ipopt 并获得以下输出时,您将知道通过这些安装中的任何一个安装正确:

With any of these installations you will know it is installed correctly when you type ipopt in a terminal window and get the following output:

No stub!
usage: ipopt [options] stub [-AMPL] [<assignment> ...]

Options:
    --  {end of options}
    -=  {show name= possibilities}
    -?  {show usage}
    -e  {suppress echoing of assignments}
    -s  {write .sol file (without -AMPL)}
    -v  {just show version}

这篇关于在 ubuntu 中安装 Ipopt 求解器以与 Pyomo 一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆