# Installation on Windows

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

## Installation on a 32-bit Windows system

#### Note

32-bit Windows systems are only support until PM4Py Version 1.2.8.

#### Note

Please note that we recommend the installation 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

Since we are using some dependenices, e.g. ciso8604, 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

A full Anaconda 5.2.0 (that is based on Python 3.6.x) installation is suggested. We cannot state that previous versions of Python will work out. Anaconda is a free and open source distribution of the Python programming language for data science and machine learning related applications. Click here to install Anaconda.

Then, install Anaconda. An important option in order to get easy access to Python from the command line / Powershell is setting the addition of Anaconda Python to the system path. pm4py requires additional packages to work. In order to install them, it is necessary to open a command line / Powershell and reach the folder that contains pm4py sources. An example of the instruction to reach a specific folder in a Windows environment is the following (the path should be replaced).

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 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

Since we are using some dependenices, e.g. ciso8604, 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

A full Anaconda 5.2.0 or a Miniconda 4.5.x installation (both are based on Python 3.6.x) is suggested. We cannot state that previous versions of Python will work out. 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 Anaconda.

You can also 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.6 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

An installation of Anaconda 5.2.0 or Miniconda 4.5.x (containing Python 3.6.x) is suggested. We cannot state that previous versions of Python will work out. You can choose between Anaconda or Miniconda.

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

Miniconda 4.5.4 (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

An installation of Anaconda 5.2.0 or Miniconda 4.5.x (containing Python 3.6.x) is suggested. We cannot state that previous versions of Python will work out. In this instruction, we are focussing on Miniconda 4.5.4.

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

The 64 bit installer (32 bit architecture has limited memory allocation for threads/processes) could be executed from the command line using the following instruction;

root@debian:~# bash Miniconda3-4.5.4-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:

sudo apt install graphviz

#### 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

#### 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 cython pyvis networkx>=2.4 ciso8601 lxml graphviz pydotplus scikit-learn sklearn pytz intervaltree 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