◐ Shell
reader mode source ↗

Installation

To install pystruct, you need cvxopt, cython and scikit-learn (which requires numpy and scipy).

The easiest way to install pystruct is using pip:

pip install pystruct

This will also install the additional inference package ad3.

Installation instructions for the requirements are below.

Linux (Ubuntu)

The easiest way to get all requirements is via the package manager, that is apt on Ubuntu and Debian:

sudo apt-get install build-essential python-dev python-setuptools python-numpy \\
    python-scipy libatlas-dev libatlas3gf-base python-cvxopt

To install the current versions of scikit-learn and pystruct, you can use pip:

pip install --user --upgrade scikit-learn pystruct

OS X & Windows

Follow instructions on the scikit-learn website and then install CVXOPT. Finally, you can install pystruct simply using:

pip install --user --upgrade pystruct

Alternative: Anaconda

In particular for OS X and Windows, an alternative is to use the Anaconda Python distribution. The anaconda environment comes with its own Python and a package manager named conda. You can install cvxopt using the conda package manager:

conda install cvxopt

And then install pystruct:

pip install --user --upgrade pystruct