How to install Pyomo without using Pip

545 views
Skip to first unread message

xiwang...@gmail.com

unread,
Apr 2, 2015, 5:25:12 PM4/2/15
to pyomo...@googlegroups.com
Dear all,
 
I encounter an error when I tried to install Pyomo using "pip install pyomo". Since the fire wall in my company disable the "pip" connection, so I am wandering whether there is a way to download the pyomo installation files and install it locally? Where to download the installation source files (instead of using pep to down load)?
 
 
Thanks very much.
 
Xiwang Li

Siirola, John D

unread,
Apr 2, 2015, 5:36:40 PM4/2/15
to pyomo...@googlegroups.com

See options 2a, 2b, and 2c in the Pyomo Installation guide (https://software.sandia.gov/downloads/pub/pyomo/PyomoInstallGuide.html … sections 5.3, 5.4 and 6.2 in the current version). 

 

The short-short answer is to download the pyomo_install utility and either the current release zip (pyomo_4.0.982.aip) or the VOTD build (pyomo_votd.zip) from https://software.sandia.gov/trac/pyomo/downloader, and use the pyomo_install script with the “--zip” option to perform an offline installation.  FWIW, I just verified yesterday that option 2c works as advertised with the VOTD build (although you may encounter a warning/error for a missing traceback2 library -- and that error can be safely ignored unless you are developing Pyomo and need the test harness).

 

john

--
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.

xiwang...@gmail.com

unread,
Apr 3, 2015, 2:00:26 PM4/3/15
to pyomo...@googlegroups.com
Thanks very much John,
 
I followed option 2b and installed the pyomo, however, when I ran the example (pyomo solve abstract1.py abstract1.dat --solver=glpk) in section 3.6 of the "PyomoOnlineDocs". It gave me an error says: Pyomo is not recognized as an internal or external command.
 
So I though that might because I did not install pyomo correctly. Then I tried to install it again using "pyomo_install --zip=pyomo_votd.zip" with the directory right. It also says :Pyomo_install: is is not recognized as an internal or external command.   So I ran "pyomo_install.py --zip=pyomo_votd.zip", then the install started.
 
Then it shows " successfully installed Pyomo", and "successfully installed PyUtilib".
 
I thought Pyomo is installed, then when I ran the "p-median" example, by "pyomo pmedian.py pmedian.dat".  It also gave me the error that Pyomo is not recognized as an internal or external command.
 
Do you know what is the problem in my installing? Can you help me to solve this issue?
 
Thanks very much.

Gabriel Hackebeil

unread,
Apr 3, 2015, 2:10:16 PM4/3/15
to pyomo...@googlegroups.com
Xiwang,

This probably means you haven’t added the directory containing the pyomo scripts to your PATH environment variable. If you used the “pyomo_install” script, it probably means a directory named pyomo was created with a virtual python environment. There should be a bin folder in this directory that contains all of the pyomo scripts as well as a pyomo-specific python executable.

If you just plan on using the pyomo command, adding this directory to your PATH should be sufficient. If you plan to write custom pyomo scripts, you must add this directory to the *beginning* of your PATH (or just before your default system python location). Only the python executable in this directory allows you to “import pyomo”, etc.

Gabe

Siirola, John D

unread,
Apr 3, 2015, 2:10:19 PM4/3/15
to pyomo...@googlegroups.com
You need to put the Python bin or scripts directory (bin for Linux/OS X, scripts for windows) on your PATH. 

John

xiwang...@gmail.com

unread,
Apr 3, 2015, 2:13:56 PM4/3/15
to pyomo...@googlegroups.com
Thanks John.
 
Do you have the instruction for this PATH adding?
 
Thanks a lot.

Xiwang LI

xiwang...@gmail.com

unread,
Apr 3, 2015, 2:18:47 PM4/3/15
to pyomo...@googlegroups.com
Thanks very much Gabe,
 
I found the folder containing Pyomo files and script at "C:\Python27\Scripts" , but do you know how to add it to the *beginning* of your PATH (or just before your default system python location)?
 
Really appreciate your help.
 
Xiwang

Gabriel Hackebeil

unread,
Apr 3, 2015, 2:34:20 PM4/3/15
to pyomo...@googlegroups.com
It would be easier for me to just tell you to google "windows add to PATH”. When I say front of PATH, I mean place at the beginning of the long string of semicolon-separated directory names. Let me know if you still have trouble.

Gabe.
Reply all
Reply to author
Forward
0 new messages