Install GraphScope on Local#

This guide will walk you through the process of installing GraphScope on your local machine.

Prerequisites#

  • Ubuntu 20.04 or later, CentOS 7 or later, or macOS 12 (Intel/Apple silicon) or later

  • Python 3.7 ~ 3.11, and pip >= 19.3

  • JDK 11 (If you want to use GIE, both JDK 8 and 20 have known compatibility issues)

Install from packages#

GraphScope is distributed via Python wheels, and could be installed by pip directly.

Install stable version of GraphScope#

You can use pip to install latest stable graphscope package

python3 -m pip install graphscope --upgrade

Tip

If you occur a very low downloading speed, try to use a mirror site for the pip.

python3 -m pip install graphscope --upgrade \
    -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com

If you encounter errors like Could not find a version that satisfies the requirement graphscope (from versions: ), please check if you are working with an old pip, and ensure pip’s version >= 19.3, as graphscope wheels are compatible with the manylinux2014 ABI.

python3 -m pip install --upgrade pip

The above command will download all the components required for running GraphScope in standalone mode on your local machine.

Install preview version of GraphScope#

If you wish to experience the latest features, you can install the preview version, which is built and released in a nightly manner.

python3 -m pip install graphscope --pre

To get a clean and tidy environment, you can also use a Docker environment to get started quickly.

docker run --name dev -it --shm-size=4096m ubuntu:latest

# inside the docker
apt-get update -y && apt-get install python3-pip default-jdk -y
python3 -m pip install graphscope ipython tensorflow

Install from source#

Optionally, You can build GraphScope from source and install it on your machine.

Setup build environment for Linux and macOS#

Build GraphScope from source needs many libraries and tools as dependencies. We provide a utility script gs to help you install all the dependencies.

# Download source code
git clone https://github.com/alibaba/graphscope
cd graphscope

python3 gsctl.py install-deps dev
# use --help to get more usage.

Use dev image with all dependencies installed#

To make our life easier, we provide a pre-built docker image with all the dependencies installed. You can use pull it and work in a container with this image to build GraphScope.

docker pull registry.cn-hongkong.aliyuncs.com/graphscope/graphscope-dev:latest
docker run --name dev -it --shm-size=4096m registry.cn-hongkong.aliyuncs.com/graphscope/graphscope-dev:latest

# In the container, download the source code.
git clone https://github.com/alibaba/graphscope

Build and install#

After the dependencies are installed on your local or in the container, you can build and install GraphScope in root directory of the source code.

make
make install

Note

Analytical engine(GAE) may require on-the-fly compilation, which needs clang or g++. Hence additional setup steps may in need to install build-essentials. e.g., on ubuntu:

apt update -y &&
apt install cmake build-essential -y

Note

Learning engine (GLE) doesn’t support running on Python 3.11 currently, cause TensorFlow lacks supports for this version.

Note

Currently, the support for arm-based platforms is very preliminary, and not ready for production yet.