Building And Installing Flink ML From Source
This documentation is for an unreleased version of Apache Flink Machine Learning Library. We recommend you use the latest stable version.

Building And Installing Flink ML From Source #

This page covers how to build and install Flink ML from sources.

Build and Install Java SDK #

In order to build Flink ML you need the source code. Either download the source of a release or clone the git repository.

In addition, you need Maven 3 and a JDK (Java Development Kit). Flink ML requires at least Java 8 to build.

To clone from git, enter:

git clone

The simplest way of building Flink ML is by running:

mvn clean install -DskipTests

This instructs Maven (mvn) to first remove all existing builds (clean) and then create a new Flink ML binary (install).

After the build finishes, you can acquire the build result in the following path from the root directory of Flink ML:


The mvn clean install command would have installed the binary into your local Maven repository so other projects can refer to it and grab it from the repository. There is no additional step required for installation.

Build and Install Python SDK #

Prerequisites #

  1. Building Flink ML Java SDK

    If you want to build Flink ML’s Python SDK that can be used for pip installation, you must first build the Java SDK, as described in the section above.

  2. Python version(3.6, 3.7, or 3.8) is required

    $ python --version
    # the version printed here must be 3.6, 3.7 or 3.8
  3. Install the dependencies with the following command:

    $ python -m pip install -r flink-ml-python/dev/dev-requirements.txt

Installation #

Then go to the root directory of Flink ML source code and run this command to build the sdist package of apache-flink-ml:

cd flink-ml-python; python sdist; cd ..;

The sdist package of apache-flink-ml will be found under ./flink-ml-python/dist/. It could be installed as follows:

python -m pip install flink-ml-python/dist/*.tar.gz