3

How can I install IPOPT solver to use it with pyomo in windows. I tried pip install ipopt but I got this error (ERROR: Failed building wheel for ipopt)

I am working on windows 10 and Python 3.7.4

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
TSobhy
  • 95
  • 1
  • 1
  • 9

1 Answers1

12

The easiest way to install a version of Ipopt on Windows is to use Anaconda:

conda install -c conda-forge ipopt

Another approach is to download the appropriate Ipopt binary for your system from this site. Unzip the downloaded file and save the ipopt.exe file to your desired directory. Then just make sure to add the directory containing the executable to your PATH environment variable

Note that both of these options will install Ipopt compiled with the MUMPS linear solver which is fine for small, well-conditioned problems but is not as performant as other linear solvers like MA27 or MA57 from the Harwell Subroutine Library.

Bethany Nicholson
  • 2,723
  • 1
  • 11
  • 18
  • 1
    Yes, the problem is I am using pyomo with other packages that don't work in anaconda :( – TSobhy Jan 28 '20 at 22:47
  • Ok, then you'll have to either compile Ipopt manually (can be really tough on Windows) or download a precompiled binary. I'll modify my answer to include the binary route. – Bethany Nicholson Jan 29 '20 at 00:18
  • Thanks for your comment. I downloaded MA57, can I use the binary file ipopt.exe with the downloaded file MA57. I tried to compile the ipopt but it is complicated and takes time. – TSobhy Feb 07 '20 at 16:29
  • If you downloaded the shared library from HSL (instead of the source code) I think you should be able to move the HSL `.dll` files into the bin directory with the ipopt executable and ipopt will be able to use it. – Bethany Nicholson Feb 10 '20 at 18:03
  • 1
    If you are using anaconda you can extract ipopt.exe into C:\ProgramData\Anaconda3\Library\bin – mrdevlar Oct 07 '21 at 14:24