Initializing help system before first use

Installing the Python Xpress module

Installation from the Python Package Index (PyPI)

The Xpress Python interface is available on the PyPI server and can be installed with the following command:

pip install xpress

Packages for Python 2.7 and 3.4+ are available, for Windows, Linux, and MacOS. The package contains the Python interface module, its documentation in PDF format, the Xpress Optimizer's libraries, and a copy of the community license (see http://subscribe.fico.com/xpress-optimization-community-license). Online documentation can be viewed at the FICO Xpress Optimization Help page.

Installation from Conda

A Conda package is available for download with the following command:

conda install -c fico-xpress xpress

The content of the Conda package is the same as that of the PyPI package. Similar to the PyPI package, Conda packages for Python 2.7 and 3.4 and subsequent versions are available, for Windows, Linux, and MacOS.

Troubleshooting the installation

Whether the Xpress Python module is downloaded from PyPI or from the Conda server, there are a few remarks that might help ensure that the installation works right away. The advice below is independent of the Python platform (PyCharm, Spyder, etc.) that may be in use.

The Xpress Python interface uses the Python package NumPy for some operation, hence NumPy must be installed. It is usually installed if a Conda installation is used, nevertheless ensure that version 1.13 or later is installed for Python versions 2.7, 3.5, and 3.6, and version 1.11 is installed for Python 3.4.

After installation, a license is not strictly necessary as the embedded Community license is used. If you already have a license (for example, a trial license, a full license, or one from the Academic Partnership Program), the XPRESS environment variable must be set, regardless of the platform, to the directory containing the license file. For example, if the license file is /home/brian/xpauth.xpr, then XPRESS must be set to /home/brian in order for the module to pick the right license.

If you installed the Xpress Optimization suite before downloading the Conda or PyPI package with the Python interface, then the XPRESS variable is already set and no action is necessary.