3

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.

ZHEHAN ZHAO
  • 37
  • 1
  • 1
  • 5

5 Answers5

3

I got the same problem after installing 3.13.1. What I did is just to download 3.11.1, then save ipopt.exe in C:\ProgramData\Anaconda3\Library\bin

Then it works.

xu meng
  • 41
  • 3
  • Hi Xu Meng, Thanks for your suggestion, but it does not work for me. It still shows that @Solver (ipopt) returned non-zero return code (3221225501) Do you have any idea on this? – ZHEHAN ZHAO Apr 04 '21 at 17:54
3

For mac users:

  1. Install homebrew in the terminal by:
    rm -fr $(brew --repo homebrew/core)
    brew tap homebrew/core

  2. Install ipopt by:
    brew install ipopt

  3. Restart your IDE.

haydnD
  • 2,225
  • 5
  • 27
  • 61
Lines King
  • 31
  • 3
1

Please, check this discussion https://github.com/conda-forge/ipopt-feedstock/issues/55 . I reported the same issue. Perhaps, you should downgrade IPOPT version to the supported one (v3.11.1).

ab123
  • 11
  • 2
1

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

ZHEHAN ZHAO
  • 37
  • 1
  • 1
  • 5
1

install this version: conda install -c conda-forge/label/cf202003 ipopt

from this link: https://anaconda.org/conda-forge/ipopt

  • Add details if solution worked for you and was it the exactly same issue you tried for – Samiksha Jagtap Jan 29 '22 at 16:23
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30938456) – NixonSparrow Feb 02 '22 at 21:21