Skip to content


API by Adnen Kadri from the Noun Project

The kglab package requires Python 3.6+.

Base Support

Package dependencies as defined in requirements.txt include:

NVidia GPU support

Additional package dependencies are required for GPU support through RAPIDS and must be installed separately:

These require use of conda as a base, and we strongly recommend using the release selector. to determine the correct configuration

Then use pip to install the other kglab dependencies atop that base conda environment.

iGraph support

Since there are difficulties getting igraph to install correctly across different environments, it is not included as a direct dependency. Instead you'll need to install the following packages separately:


PEP 517

If you are using pip you may run into the dreaded PEP 517 errors when installing libraries.

Problems tend to be encountered with particular dependencies such as statsmodels, multidict, yarl, and so on, with error messages similar to:

ERROR: Could not build wheels for foobar which use PEP 517
and cannot be installed directly

To be clear, this is partly due to the fact that both Windows and macOS cut corners on their attempts to balance being both "consumer products" and actual operating systems. Consequently their compiler environments can became gnarled messes – especially when you must work with a wide range of machine learning libraries, which tend to stress this point.

To be blunt, using Linux (e.g., Ubuntu, etc.) helps if you're serious about software engineering.

The best advice we can give to help troubleshoot this constellation of errors is that PEP 517 does not play well with Python virtual environments. If you get stuck with installation errors, find a way around using a virtual environment.

You can also try to use the following approach to pre-load the troublesome dependencies, although YMMV:

pip install statsmodels  --no-binary :all:

This is be no means a simple matter to resolve. For more details about root issues encountered when building Python packages, the following discussions are highly recommended:

  1. You may need to install extra dependencies for fsspec since not all included filesystems are usable by default. Support for Amazon S3 and Google GCS are installed by default. See the extras_require dict in 

  2. There are known version conflicts regarding NumPy (>= 1.19.4) and TensorFlow 2+ (~-1.19.2) 

  3. You need to have a Java JDK installed to run PSL. 

Last update: 2021-05-06