'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 1:[1]
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.
Solution 2:[2]
For mac users:
Install homebrew in the terminal by:
rm -fr $(brew --repo homebrew/core)brew tap homebrew/coreInstall ipopt by:
brew install ipoptRestart your IDE.
Solution 3:[3]
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).
Solution 4:[4]
install this version: conda install -c conda-forge/label/cf202003 ipopt
from this link: https://anaconda.org/conda-forge/ipopt
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | xu meng |
| Solution 2 | haydnD |
| Solution 3 | |
| Solution 4 | amiro rezatti |
