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

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

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 pm4py/pm4py-core:latest

It could be then run trough the following command.

docker run -it pm4py/pm4py-core:latest bash

Classical Installation

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

Install Anaconda/Miniconda

Anaconda 2021.05 (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"

Apple M1/M2 support

The support for the new CPU architecture Apple Silicon (M1/M2) is partial, e.g., not all the dependencies are available for the platform.

The following commands help to get a minimal installation of pm4py working on M1/M2:


pip3 install numpy pandas networkx deprecation
pip3 install -–no-deps pm4py
pip3 install scipy sklearn matplotlib lxml graphviz
                        

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 pm4py/pm4py-core:latest

It could be then run trough the following command.

docker run -it pm4py/pm4py-core: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:

yum 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-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):

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