Download

Prerequisites

Install Python

We recommend that you use Pyomo with a scientific Python distribution.  Linux, Mac OS/X and other Unix variants typically have Python pre-installed. However, scientific Python distributions that contain the SciPy Stack include many utilities that Pyomo users will find useful, including SciPy optimizers and MatplotLib plotting capabilities. See SciPy’s list of scientific Python distributions.

Install Optimization Solvers

Pyomo does not include any stand-alone optimization solvers. Consequently, most users will need to install third-party solvers to analyze optimization models built with Pyomo.

Note that Pyomo can remote launch optimization solvers on NEOS.  

Installing the Latest Pyomo Release

Install Pyomo with pip

Scientific Python distributions include the pip package that is used to download and install the latest Pyomo release. The Python installation includes a bin or Scripts directory that includes a pip script. Add this directory to your PATH so you can execute the pip script. If you have administrator access, then you can install Pyomo in your system Python installation by executing the following in a shell:

        pip install pyomo

INSTALLING Pyomo with CONDA

Some scientific Python distributions also include the conda package, which can also be used to download and install the latest Pyomo release. You can install Pyomo in your system Python installation by executing the following in a shell:

        conda install -c conda-forge pyomo

Installing from source

(Advanced Users and Developers) Pyomo may be installed directly from source by first cloning the main development repository from GitHub:

        git clone https://github.com/Pyomo/pyomo

Then change into the “pyomo” directory that Git just created and run

        python setup.py install

Conditional Dependencies

Extensions to Pyomo, and many of the contributions in pyomo.contrib, often have conditional dependencies on a variety of third-party Python packages including but not limited to:

matplotlib networkx numpy openpyxl pandas pint pymysql pyodbc pyro4 scipy sympy xlrd

A full list of conditional dependencies can be found in Pyomo's setup.py and displayed using:

python setup.py dependencies --extra optional

Pyomo extensions that require any of these packages will generate an error message for missing dependencies upon use.

When using pip, all conditional dependencies can be installed at once using the following command:

pip install 'pyomo[optional]'

When using conda, many of the conditional dependencies are included with the standard Anaconda installation.

You can check which Python packages you already have installed using the command pip list or conda list. Additional Python packages may be installed as needed.

Getting Help

Click Here to Post a Pyomo Question on StackExchange

License

Pyomo is available under the BSD license. For more information, see the Pyomo License.