Installation on Windows

In this section, information about getting PM4Py started on a Windows based system is presented.

Install on a 64-bit Windows System

This section is divided into four parts that are required to get PM4Py running.

Install a Windows C/C++ compiler

A fundamental package to install in order to make dependencies work is the Microsoft Visual C++ Redistributable, that can be found at the following URL: Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019

Only in Python 3.6, since we are using some dependencies, e.g. ciso8601, you also need a C/C++ compiler. We suggest to install the Microsoft Visual Studio 2017 compiler that is available for free through the following link: Microsoft Visual Studio

Note

During installation, it is vital to install all C++ related development tools. Note that this leads to a big download, i.e. around 6GB.

Install GraphViz

For the purpose of visualization with pm4py, GraphViz installation is required. To install GraphViz, the installer on this page could be used: GraphViz

After installation, GraphViz is located in the program files directory. The bin\ subfolder of the GraphViz directory needs to be added manually to the system path. For Windows 10, we suggest the following article in order to have an explanation of how to add a new folder to the system path: Adding a folder to the system path

Install Anaconda/Miniconda

Anaconda is a free and open source distribution of the Python programming language for data science and machine learning related applications. If you have not install any variant, we suggest Miniconda. Click here to install Miniconda.

During the installation of the Miniconda distribution, it is important to select the addition of Miniconda Python to the system path option. This allows us to get easy access to Python from the command line / Powershell.

C:\>cd C:\Users\johndoe\pm4py-source

Install PM4Py

In order to install PM4Py and its dependencies, the following command should be executed:

pip install pm4py

.zip file

A .zip file containing Windows 64-bit Miniconda 3.8 distribution and all the dependencies already installed could be found at clicking here.

Install PM4Py on Mac OS

You can chosse between an Docker image or the classical installation process.

Installation via Docker

A Docker image is available on the Docker hub and could be retrieved through the command.

docker pull javert899/pm4py:latest

It could be then run trough the following command.

docker run -it javert899/pm4py:latest bash

Classical Installation

This section provides you help to run PM4Py without using Docker.

Install Anaconda/Miniconda

Anaconda 2020.07 (if not already installed; it is not necessary if Miniconda is installed) could be retrieved by clicking here.

Miniconda (if not already installed; it is not necessary if Anaconda is installed) could be retrieved by clicking here.

Install the PM4Py package

In order to install PM4Py and its dependencies, the following command could be provided:

pip install pm4py

To check if everything is done correctly, the following command can be used.

python -c "import pm4py"

Installation on Linux

You can choose between an Docker image or the classical installation process.

Installation via Docker

A Docker image is available on the Docker hub and could be retrieved through the command.

docker pull javert899/pm4py:latest

It could be then run trough the following command.

docker run -it javert899/pm4py:latest bash

Classical Installation

Install C/C++ compiler

Most distributions default install include already the gcc and g++ compilers, respectively compiling C and C++ code. In order to check the presence of gcc and g++ on your current distribution, along with their version, one of following commands can be used.

gcc -v
g++ -v

If they are not installed, refer to your distribution support for instructions on how to install them.

Install GraphViz

The presence of GraphViz is required on the system. To check the presence of GraphViz, please give the following command.

dot -h

If GraphViz is not installed, you will get an error from the output of that program. If GraphViz is not installed, you will get an error from the output of that program. To install GraphViz, a command depending on the distribution should be given. We provide some commands for the most widely used distributions.

For Debian/Ubuntu, the following command can be used:

apt-get install graphviz

For Fedora:

yum install graphviz

Install Tkinter

Tkinter is required by Python but could not be installed with pip. It is required to install it through the distribution package manager.

For Debian/Ubuntu, you can use the following command:

apt-get install python3-tk

For Fedora:

ayum install tkinter

Other libraries

Some other libraries are required to be manually installed on some platforms (like ARM).

apt install libblas-dev
apt install liblapack-dev
apt install libsuitesparse-dev

Install Anaconda/Miniconda

Miniconda (if not already installed; it is not necessary if Anaconda is installed) could be retrieved by clicking here.

The 64 bit installer could be executed from the command line using the following instruction;

root@debian:~# bash Miniconda3-latest-Linux-x86_64.sh

Note

It is not required to be root; any user could suffice.

As the first step in the installation of Miniconda, it is required to read the license agreements. Press Enter key in order to read them, move with up and down arrow keys in order to read the points, and then click q in order to quit the license agreements and accept/deny (yes/no) that.

Then, a path for the installation of Miniconda is required. The proposed path, that is inside the user directory, is proposed and could be accepted as-is. Then, Miniconda asks if the user wants to add executables to the user path, it is convenient to say yes here.

Install the PM4Py package

In order to install PM4Py and its dependencies, the following command could be provided:

pip install pm4py

Installation on Linux ARM32/ARM64

The following section provides information about the installation process on the Linux operating systems within ARM32/ARM64 platforms (e.g., Raspberry(s) 0, 1, 2, 3, 4 ..., Android smartphones, ...).

Install C/C++ compiler

Most distributions default install include already the gcc and g++ compilers, respectively compiling C and C++ code. In order to check the presence of gcc and g++ on your current distribution, along with their version, one of following commands can be used.

gcc -v
g++ -v

If they are not installed, refer to your distribution support for instructions on how to install them.

Install GraphViz

The presence of GraphViz is required on the system. To check the presence of GraphViz, please give the following command.

dot -h

If GraphViz is not installed, you will get an error from the output of that program. If GraphViz is not installed, you will get an error from the output of that program. To install GraphViz, a command depending on the distribution should be given. We provide some commands for the most widely used distributions.

For Debian/Ubuntu/Raspbian, the following command can be used (xdg-utils provides support for Matplotlib visualizations):

sudo apt install graphviz xdg-utils

Install Python

If Python is not installed, you need to install that.

For Debian/Ubuntu/Raspbian, you can use the following command:

sudo apt install python3 python3-pip

Install Tkinter

Tkinter is required by Python but could not be installed with pip. It is required to install it through the distribution package manager.

For Debian/Ubuntu/Raspbian, you can use the following command:

sudo apt install python3-tk

Other packages

Other packages needs to be installed in order for PM4Py to work correctly. These include some dependencies that in this platform is risky to install with PIP.

For Debian/Ubuntu/Raspbian, you can use the following command to install the strictly needed packages:

sudo apt install python3-numpy python3-scipy python3-matplotlib python3-pandas python3-pulp python3-lxml python3-networkx python3-pandas python3-sklearn

Install the requirements

In this platform, we don't advise to install directly the PM4Py packages or its requirements. Instead, a careful selection of the packages is needed.

To install the strict requirements, the following command can be used (sudo means installing with the root user) (if you use Python 3.6, also the package ciso8601 should be installed):

sudo pip3 install pyvis graphviz pydotplus pytz intervaltree deprecation tqdm stringdist pyemd jsonpickle sympy pandas==0.25.3

Install PM4Py

After installing the required packages, PM4Py can be eventually installed (without dependencies):

sudo pip3 install --no-deps pm4py

(Optional) CVXOPT requirements

The CVXOPT package is not available for the ARM32 platform. Hence, on Raspberry Pi Zero, Pi A, Pi A+, Pi B, Pi B+ or other ARM32 based machines it is impossible to perform the alignments with PM4PYCVXOPT.

In order to use the CVXOPT package for the alignments, the following instructions can be used. First, the CVXOPT package for ARM64 needs to be installed

sudo apt install python3-cvxopt

Then, the following command can be used to install PM4PYCVXOPT

pip3 install --no-deps pm4pycvxopt