The troubles of using GLPK with pyomo seem to be legendary. I also tried without success to run a little pyomo script that solves a trivial assignment problem with GLPK as the the solver.
None of the tips that helped others, like setting PATH variables or installing scikit-glpk worked for me.
I am working under windows and use WinPython that I have relocated to a "non-standard" folder.
When I looked into some of the batch files that come with the GLPK download, I saw that they contain some definitions for paths that e.g. define the expected(?) location of the source files for building GLPK:
In Build_CLL.bat that looks like
rem Build GLPK for C#/CLI DLL with Microsoft Visual Studio Community 2015
rem and Windows SDK 7.1.
rem NOTE: Make sure that the following variables specify correct paths:
rem HOME, SWIG, SDK, NET.
rem Path to GLPK source (glpk.h will be in $(GLPK_HOME)/src)
set GLPK_HOME=".."
rem Path to Visual Studio Express
set HOME="C:\Program Files (x86)\Microsoft Visual Studio 14.0"
rem Path to SwigWin
set SWIG="C:\Program Files (x86)\swig\swigwin-3.0.12"
rem Path to Windows SDK
set SDK="C:\Program Files (x86)\Windows Kits\10"
rem Path to .NET Framework
set NET="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\"
set PATH=%NET%;%PATH%
...
Question:
What are the "assumptions" of the batch files regarding the location from where they are invoked?
What role does it play from where
pip installis called?
as reportedly anaconda manages to correctly install GLPK as a pyomo solver there must be some preconditions that must be met in order to be able to use GLPK for pyomo.