-1

I wrote my code in python with pyomo... at the end, when I want to run my script, I've faced this error: WARNING: "[base]/site-packages/pyomo/solvers/plugins/solvers/GLPK.py", 150, _default_executable Could not locate the 'glpsol' executable, which is required for solver 'glpk'

ApplicationError: No executable found for solver 'glpk'

I work with mac... And I dont know what should I do to use 'glpk' or 'cplex' to solve my model....

1 Answers1

1

Pyomo is a "pure Python" package and by design does not include any solvers. You must install all solvers separately. After installation, make sure that the directory(ies) containing the solver executables (glpsol, cplex, gurobi.sh, etc) are in your PATH environment variable.

jsiirola
  • 2,259
  • 2
  • 9
  • 12
  • Tnx for your answer... Im new on mac and python! how can I check the solvers? I wrote in terminal: pip install glpk but I face with error: Failed building wheel for glpk – arman nemat pasand Apr 29 '17 at 20:23