Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you install glpk-solver along with pyomo in Winpython

I want to use "pyomo" for my studies. I installed pyomo via easy_install coopr install instructions, Pyomo needs a solver to work so I wanted to install the (GNU Linear Programming Kit) glpk_webpage, pyomo seems to be installed just right because I can import it in spyder (i am using WinPython-64bit-2.7.5.3) with import coopr.pyomo

However, I cannot do anything without glpk I guess...

I downloaded glpk-4.52 (latest version) from the ftp server but I do not know what to do with the batch files I found in the "w64"-folder I should use(?) according to "Installing GLPK"

I do not have Visual Studio installed - Isn't it possible to work without it?

like image 613
www.pieronigro.de Avatar asked Dec 08 '22 10:12

www.pieronigro.de


1 Answers

I recently installed GLPK for use with python 3.5 and pyomo under windows 7 and would like to report how I succeeded. I installed pyomo via:

pip install pyomo

Then, download WinGLPK 4.55 from here: WinGLPK
This does not work for newer versions at the moment.
Unzip it and copy the whole w64 folder to C:\w64
Include folder C:\w64 in your system PATH (so that glpsol.exe is found).

Check your installation using the simple example from the official pyomo documentation:

pyomo solve abstract1.py abstract1.dat --solver=glpk 

The files abstract1.py and abstract1.dat can also be found in the pyomo documentation.

I hope this will help the next desperate GLPK installer.

like image 88
Friederike Meier Avatar answered Dec 11 '22 10:12

Friederike Meier