This is 2017, and pyomo can be easily installed via conda
conda install -c conda-forge pyomo pyomo.extras
Conda can also be used to install LP and NLP solvers.
conda install -c cachemeorg glpk ipopt_bin
If you are on a Mac or Linux, you can install updated versions using conda-forge.
conda install -c conda-forge glpk ipopt
If you prefer to install pyomo or solvers via pip:
Make sure that the PATH in the windows where pyomo.exe is located is really C: \ Anaconda \ Scripts
Also, PATH was set correctly since cmd recognized the pyomo command at the beginning
WITH
echo %path%
on cmd you can get a list of all the paths (where C: \ Anaconda \ Scripts \ "is included
So, with Anaconda, you had to set the path where glpsol.exe is located in order to do this from cmd.exe and considering that you unpacked your winglpk to "C: \ glpk \ w64":
setx path "%path%;c:\glpk\w64"
After that, restart cmd and go with the "cd" command, where you have data.py and data.dat
Finally it works! Thanks to the pyomo project mailing list for testimonials
For more information, I recommend reading the following links:
wingplk: http://en.wikibooks.org/wiki/GLPK/Windows_executables
setting the path in windows 7: http://www.voidspace.org.uk/python/articles/command_line.shtml https://superuser.com/questions/284342/what-are-path-and-other-environment-variables -and-how-can-i-set-or-use-them