ApplicationError: No executable found for solver 'ipopt' in Pyomo
Asked Answered
A

6

5

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.

Antibaryon answered 19/11, 2020 at 13:46 Comment(6)
Welcome to Stackoverflow. Make sure you've read the guidelines for posting questions. As a rule of thumbs, post data and the attemps you've done to solve or answer your questions.Herron
How did you install it? Windows Command line, or Anaconda Command line, or some other OS command line?Commodore
Hi, Dustin I supposed to install it with Anaconda Command lineAntibaryon
Is there already a solution to this issue?Feucht
It is running for me in Windows, but not in Mac OS.Feucht
Dear Zhao, could you solve your problem?Blowhole
A
1

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

Antibaryon answered 8/11, 2021 at 22:9 Comment(0)
S
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.

Sauer answered 8/1, 2021 at 16:15 Comment(1)
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?Antibaryon
R
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.

Rodrigorodrigue answered 25/3, 2021 at 14:40 Comment(1)
Hi, thanks for your comments. May I ask what is brew? The terminal does not response to brew commentAntibaryon
E
2

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

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

Eruption answered 29/1, 2022 at 13:21 Comment(2)
Add details if solution worked for you and was it the exactly same issue you tried forInexpugnable
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 ReviewTruelove
M
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).

Meyers answered 27/11, 2020 at 10:0 Comment(2)
Hi, ab123 I tried to installed V3.11.1, but it shows IPOPT does not existAntibaryon
this is the exact comment from the mentioned issue github.com/conda-forge/ipopt-feedstock/issues/…Resolute
A
1

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

Antibaryon answered 8/11, 2021 at 22:9 Comment(0)
Q
0

One of the solutios that worked for me is to save ipopt.exe in Ubuntu-22.04\Library\bin next to conda when you use WSL.

Quincuncial answered 22/7, 2024 at 10:54 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.