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解决此问题
相关文章