Dependencies¶
The kglab package requires Python 3.7+.
Base Support¶
Package dependencies as defined in
requirements.txt
include:
- chocolate
- csvwlib
- cryptography
- decorator
- fsspec1
- gcsfs
- icecream
- Morph-KGC
- NetworkX
- NumPy2
- OWL-RL
- Oxrdflib
- pandas
- pslpython3
- pyarrow
- pynvml
- pySHACL
- python-dateutil
- pyvis
- RDFlib
- requests
- statsmodels
- tqdm
- urlpath
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:
Troubleshooting¶
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:
- https://twitter.com/wesmckinn/status/1148350953793490944
- https://discuss.python.org/t/pep-517-and-projects-that-cant-install-via-wheels/791
- https://labs.quansight.org/blog/2021/01/python-packaging-brainstorm/
-
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 theextras_require
dict in https://github.com/intake/filesystem_spec/blob/master/setup.py ↩ -
There are known version conflicts regarding NumPy (>= 1.19.4) and TensorFlow 2+ (~-1.19.2) ↩
-
You need to have a Java JDK installed to run PSL. ↩