ApplicationError:在Pyomo中找不到求解器的可执行文件 [英] ApplicationError: No executable found for solver 'ipopt' in Pyomo

查看:20
本文介绍了ApplicationError:在Pyomo中找不到求解器的可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习Pyomo,并尝试使用ipopt来解决一个示例问题。但一开始,我已经安装了包,然后总是显示没有找到ipopt。之后,我重新安装了很多次,现在显示

'''WARNING: Could not locate the 'ipopt' executable, which is required for solver
    ipopt
---------------------------------------------------------------------------
ApplicationError                          Traceback (most recent call last)
<ipython-input-2-2e55f87657f9> in <module>
      1 model.N=50
      2 instance = model.create_instance()
----> 3 results = opt.solve(instance) # solves and updates instance

D:Anacondolibsite-packagespyomooptasesolvers.py in solve(self, *args, **kwds)
    514         """ Solve the problem """
    515 
--> 516         self.available(exception_flag=True)
    517         #
    518         # If the inputs are models, then validate that they have been

D:Anacondolibsite-packagespyomooptsolvershellcmd.py in available(self, exception_flag)
    116             if exception_flag:
    117                 msg = "No executable found for solver '%s'"
--> 118                 raise ApplicationError(msg % self.name)
    119             return False
    120         return True

ApplicationError: No executable found for solver 'ipopt'
'''**bold**

斜体

报价

我不知道如何修复它,我在D桌安装了蟒蛇,而不是C桌。有谁能帮帮我,我一个月后有一次作业和考试需要它。谢谢。

推荐答案

已通过安装最新版本的Anacondo和3.11版本的IPopt解决此问题

这篇关于ApplicationError:在Pyomo中找不到求解器的可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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