---
title: Installing the PingIntelligence machine learning service
description: Install the PingIntelligence machine learning (ML) service node.
component: pingintelligence
version: 5.2
page_id: pingintelligence:installing_pingintelligence_for_apis:pingintelligence_install_machine_learning_service
canonical_url: https://docs.pingidentity.com/pingintelligence/5.2/installing_pingintelligence_for_apis/pingintelligence_install_machine_learning_service.html
revdate: April 3, 2024
section_ids:
  before-you-begin: Before you begin
  about-this-task: About this task
  steps: Steps
  choose-from: Choose from:
  example: Example:
  example-2: Example:
  result: Result:
  next-steps: Next steps
---

# Installing the PingIntelligence machine learning service

Install the PingIntelligence machine learning (ML) service node.

## Before you begin

* Install Python 3.8.13 in the machine learning service node.

* Install pip3 and ensure it points to Python 3.8.13.

* Install Python as the root user and make sure Python3 is pointing to python 3.8.13 (for example, by creating a soft link: `ln -s /usr/local/bin/python3.8 /usr/bin/python3`).

* Make sure management port 8090 is available.

## About this task

To install the PingIntelligence machine learning service:

## Steps

1. Go to the [Ping Identity Product Downloads website](https://www.pingidentity.com/en/resources/downloads.html).

2. Under PingIntelligence for APIs, click **View Now**.

3. Click **Download** under PingIntelligence for APIs.

4. Select a deployment method.

5. After downloading the file, copy the machine learning (ML) service file to the `/opt` directory or any other directory where you want to install the ML service.

6. Change the working directory:

   ### Choose from:

   * If you are installing as a root user, change the working directory to `/opt`.

   * If you want to install as a non-root user, choose any other location.

7. At the command prompt, type the following command to untar the ML service build file:

   ```
   tar –zxvf  <filename>
   ```

   ### Example:

   ```
   tar –zxvf pi-api-mlservice-5.2.tar.gz
   ```

8. To verify that the ML service successfully installed, type the `ls` command at the command prompt.

   ### Example:

   ```
   /opt/pingidentity/$ ls pingidentity
   Ml_service
   ```

   ### Result:

   This command lists the `pingidentity` directory and `ml_service` directory.

9. Install the requirements:

   ```
   pip3 install -r /opt/pingidentity/ml_service/lib/requirements.txt
   ```

10. To update the `properties.rc` file:

    1. Add Kafka, ABS, and MongoDB details to the `properties.rc` file in `config` directory.

    2. Copy the MongoDB (`mongo.crt`) and Kafka (`kafka.crt`) certificates to the `ml_service` node and provide that path in the `properties.rc` file.

    3. Set `export mongo_ssl` to `true`.

       ```
       export mongo_ssl="true"
       ```

    4. Set `export kafka_producer_insync_replicas` to 1.

       ```
       export kafka_producer_insync_replicas=1
       ```

## Next steps

* [Changing default settings](pingintelligence_machine_learning_service_default_settings.html)

* [Obfuscating keys and passwords](pingintelligence_machine_learning_service_obfuscate.html)

* [Starting and stopping the server](pingintelligence_machine_learning_service_start_stop.html)
