first things first...
After installing, did you log out COMPLETELY or restart your computer to register the new environment variables upon re-login?
In a terminal window you should be able to type:
>which ipopt
And get a path back to the registered executable (or a symbolic link). This is the executable that python/pyomo is calling to solve the optimization. If you get "not found" or such, then it isn't installed properly and you need to go back to the coin-or site and look for instructions.
If it is installed, you should finally verify that it is "callable" from the same command prompt. It should look similar to this:
>ipopt
No stub!
usage: ipopt [options] stub [-AMPL] [<assignment> ...]
Options:
-- {end of options}
-= {show name= possibilities}
-? {show usage}
-bf {read boundsfile f}
-e {suppress echoing of assignments}
-of {write .sol file to file f}
-s {write .sol file (without -AMPL)}
-v {just show version}
If you know where it is installed or you can search and find the executable, navigate to that folder (it is likely inside the version numbered folder) and the bin
(binaries) folder under the version number. Then try to run the executable from there with the ipopt
command. If that works, you know the install location and you could:
- unpdate your environment variables to include that. (I'm not versed on Unbuntu) but this can be screwed up and cause big problems if you don't know what you are doing.
- copy that path and simply provide that path in
pyomo
when you ask the solver factory for the solver and provide the path reference. On my machine that would be this location where Homebrew installs a symbolic link:
solver = SolverFactory('ipopt', executable='/usr/local/bin/ipopt')
If none of this gets you anywhere, you might want to use Homebrew to install it (instead of apt-get
) ... Instructions are on the coin-or site I believe and I think that is all compatible with Ubuntu.