Installation

Quick Install

DeepGraph can be installed via pip from PyPI

$ pip install deepgraph

Depending on your system, you may need root privileges. On UNIX-based operating systems (Linux, Mac OS X etc.) this is achieved with sudo

$ sudo pip install deepgraph

Alternatively, if you’re using Conda, install with

$ conda install -c conda-forge deepgraph

Installing from Source

Alternatively, you can install DeepGraph from source by downloading a source archive file (tar.gz or zip).

Source Archive File

  1. Download the source (tar.gz or zip file) from https://pypi.python.org/pypi/deepgraph/ or https://github.com/deepgraph/deepgraph/
  2. Unpack and change directory to the source directory (it should have the files README.rst and setup.py).
  3. Run python setup.py install to build and install. As a developer, you may want to install using cython: python setup.py install --use-cython.
  4. (Optional) Run py.test to execute the tests if you have pytest installed.

GitHub

  1. Clone the deepgraph repostitory

  2. Change directory to deepgraph

  3. Run python setup.py install to build and install. As a developer, you may want to install using cython: python setup.py install --use-cython.

  4. (Optional) Run py.test to execute the tests if you have pytest installed.

Installing without Root Privileges

If you don’t have permission to install software on your system, you can install into another directory using the --user, --prefix, or --home flags to setup.py.

For example

$ python setup.py install --prefix=/home/username/python

or

$ python setup.py install --home=~

or

$ python setup.py install --user

Note: If you didn’t install in the standard Python site-packages directory you will need to set your PYTHONPATH variable to the alternate location. See here for further details.

Requirements

The easiest way to get Python and the required/optional packages is to use Conda (or Miniconda), a cross-platform (Linux, Mac OS X, Windows) Python distribution for data analytics and scientific computing.

Python

To use DeepGraph you need Python 2.7, 3.4 or later.

Pandas

Pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.

Pandas is the core dependency of DeepGraph, and it is highly recommended to install the recommended and optional dependencies of Pandas as well.

NumPy

NumPy is the fundamental package for scientific computing with Python.

Needed for internal operations.

Optional Packages

The following packages are considered to provide very useful tools and methods.

Scikit-Learn

sklearn is a Python module integrating classical machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib).

Sklearn-pandas

sklearn-pandas provides a bridge between Scikit-Learn’s machine learning methods and pandas-style Data Frames.