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

前端 未结 4 1344
暖寄归人
暖寄归人 2021-01-06 15:16

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

4条回答
  •  抹茶落季
    2021-01-06 16:01

    Better late than never: in order to use GLPK (executable glpsol.exe), it must be somewhere on your sytem environment variable "Path". For sake of an example, let's assume you put the GLPK executable into the folder C:\GLPK\bin. Then (steps copied from this answer by melhosseiny):

    1. Hold Win and press Pause.
    2. Click Advanced System Settings.
    3. Click Environment Variables.
    4. Append ;C:\GLPK\binto the Path variable.
    5. Restart command prompt.

    Now try to launch glpsol from any directory. If it is found, pyomo should now be able to use it.

提交回复
热议问题