opengm is a comprehensive probabilistic graphical model library written in C++ with a python interface. It's hard to compile. If you're using anaconda, though, it's easy:

conda install -c https://conda.anaconda.org/ilastik opengm

May this save you an afternoon.