Installation
To install the latest deployed version of the Python client, run:
pip install graphdatascience
1. System requirements
The GDS Python client depends on Python, the Neo4j Python Driver, and a server-side installation of the GDS library (see installation instruction for the GDS library). The Python client supports the following versions of the other three components:
Python Client | GDS version | Python version | Neo4j Python Driver version |
---|---|---|---|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
||
|
|
||
|
|
|
|
|
|
|
|
|
|||
|
|
2. Versioning
To make things easy for users of the Python client, our aim is that running pip install --upgrade graphdatascience
should give you a version of the client that supports all currently supported GDS library versions, starting with 2.0.
The Python client follows semantic versioning.
Python client versions do not map identically to versions of the GDS library. Eg. Python client version X.Y must not necessarily be compatible with GDS library version X.Y. Instead, the Python client may be released independently and one has to consult System requirements above to figure out whether one’s client version is compatible with the GDS library on the server.
3. Optional dependencies
Some functionality of the graphdatascience
library requires extra dependencies.
These dependencies are not installed by default since
-
They may be somewhat sizeable, and the functionality they enable is not necessarily something every user of the library needs, or
-
They may require additional system specific installation steps in addition to
pip install
.
Instructions on how to install these extra dependencies and what they enable is outlined in this section.
3.1. Neo4j python driver speedup extension
The graphdatascience
library utilizes the Neo4j Python Driver under the hood to communicate with Neo4j DBMSs.
In order to enable the driver speedup given by the Neo4j python driver rust extension, one has to install the optional rust_ext
dependency:
pip install graphdatascience[rust_ext]
Though unlikely, depending on your system, additional steps may be required. If this is the case, those steps are outlined in the Neo4j python driver rust extension README.
3.2. OGB dataset loading
In order to use the convenience OGB dataset loading functionality of graphdatascience
, one has to install the optional ogb
dependency:
pip install graphdatascience[ogb]
3.3. NetworkX graph loading
In order to use the convenience NetworkX graph loading functionality of graphdatascience
, one has to install the optional networkx
dependency:
pip install graphdatascience[networkx]