pythonexecutablepyomoipopt

ApplicationError: No executable found for solver 'ipopt' in Pyomo


I am learning Pyomo and trying to use ipopt to solve an example question. but initially, I have installed package, then it always shows that there is not a ipopt found. After that, I reinstalled many time, now it shows that

'''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:\Anacondo\lib\site-packages\pyomo\opt\base\solvers.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:\Anacondo\lib\site-packages\pyomo\opt\solver\shellcmd.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**

italic

quote

I have no idea how to fix it and I installed anaconda in desk D instead of C. Could anyone please help me, I need it for an assignment and exam in a month. Thanks.


Solution

  • The issue has been solved by installing the latest version of anacondo and the 3.11 version of ipopt