Installing the xlmhg package should be straightforward on Linux, Windows, and Mac OS X. It only requires Python 2.7.x or 3.5.x to be installed. If you have a different version of Python, you have to install the package from source.


To see which version of Python you’re running, you can always run python -V in a terminal / command prompt window. Alternatively, you can run the following in Python:

import sys

The XL-mHG software is hosted on PyPI, the central repository for Python packages. The recommended installation procedure on Linux, Windows, and Mac OS X is using pip, the main tool for installing Python packages.

Installing the latest version

To install the latest version of the xlmhg Python package, run:

pip install xlmhg

Installing a specific version

To install a specific version of the xlmhg Python package, e.g., “2.3.1”, run:

pip install xlmhg==2.3.1

Specifying a version range

XL-mHG follows semantic versioning, so changes in the major release number (e.g., 1.x.x vs. 2.x.x) indicate a backwards-incompatible API change. To install the latest version of a specific major release number (e.g., “2.x.x”), run:

pip install "xlmhg>=2,<3"

Installation from source

This installation method is only required for Python versions other than 2.7 or 3.5. The installation command is the same (pip install xlmhg), but the installation involves the compilation of C source code using a C compiler. The procedure for installing an appropriate compiler is different for different operating systems.

Ubuntu Linux

Do the following to install the gcc compiler (requires root privileges):

$ apt-get install build-essential


For Python 2.6-3.2, use the Microsoft Visual Studio 2008 compiler (32-bit / 64-bit). For Python 3.3 and 3.4, use the Visual Studio 2010 compiler (32-bit / 64-bit).