Trying to use glpk

3,975 views
Skip to first unread message

john

unread,
Sep 18, 2015, 2:42:56 AM9/18/15
to Pyomo Forum
Hi
I have just downloaded Pyomo and was able to solve optimization problems using the Neos solvers.
However when I try to use glpk using the command:
pyomo solve --solver=glpk diet1.py diet.dat
I get the following errors:

C:\Users\john\Home\RnD\src\Python\PyomoWorx>pyomo solve --solver=glpk diet1.py diet.dat
[    0.00] Setting up Pyomo environment
[    0.00] Applying Pyomo preprocessing actions
[    0.02] Creating model
[    0.08] Applying solver
WARNING: "[base]\site-packages\pyomo\solvers\plugins\solvers\GLPK_old.py", 68, executable
        Could not locate the 'glpsol' executable, which is required for solver 'glpk'
[    0.09] Pyomo Finished
ERROR: Unexpected exception while running model:
        No executable found for solver 'glpk'

I have installed the the glpk packages using the winglpk from the url: http://winglpk.sourceforge.net/
I have also added the executables (which exist in the subdirectory w64) to the PATH.
In particular, I have added "C:\Packages\winglpk-4.55\glpk-4.55\w64\" to the PATH.

Any suggestions/advice which will help me to use glpk solver will be appreciated.
Many thanks!

David Woodruff

unread,
Sep 18, 2015, 3:02:38 AM9/18/15
to pyomo...@googlegroups.com
take a look at the video posted in the blog section of pyomo.org that talks about how to know when glpk is not installed correctly.
  Dave


--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

john

unread,
Sep 19, 2015, 12:29:56 AM9/19/15
to Pyomo Forum, dlwoo...@ucdavis.edu
Thanks! It works well no :)

SIDDHARTHA PAUL

unread,
Nov 17, 2017, 9:12:29 AM11/17/17
to Pyomo Forum

David Woodruff

unread,
Nov 17, 2017, 1:31:59 PM11/17/17
to pyomo...@googlegroups.com
That's good advice. If you want to check your installation, here is a video that may only annoy you because it helps you see if you have *not* installed correctly (but sometimes that is nice to know):

 http://dlwoodruff.ucdavis.edu/badGLPK.mp4

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages