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.
65 Answers
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.
1For 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.
Please, check this discussion . I reported the same issue. Perhaps, you should downgrade IPOPT version to the supported one (v3.11.1).
2The issue has been solved by installing the latest version of anacondo and the 3.11 version of ipopt
install this version: conda install -c conda-forge/label/cf202003 ipopt
2