> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install additional libraries

> Add required Python libraries to your Livy cluster

Prophecy requires you to install additional Python libraries on your Livy cluster to enable [selective data sampling](/data-engineering/development/runs/data-sampling#selective-sampling).

## Prerequisites

Before installing the libraries, identify which Prophecy library version your project uses. The bundle version must match your project's Prophecy library version.

To check your project's Prophecy library version:

1. Open your project metadata.
2. Click on the **Dependencies** tab.
3. Find the ProphecyPythonLibs entry and note the version number.

## Required libraries

The following Python libraries are required for selective sampling on Livy clusters running Spark 3.5:

| Library            | Version    | Purpose                            |
| ------------------ | ---------- | ---------------------------------- |
| certifi            | 2025.11.12 | SSL certificate verification       |
| charset-normalizer | 3.4.4      | Character encoding detection       |
| idna               | 3.11       | Internationalized domain names     |
| requests           | 2.32.5     | HTTP library for API communication |
| urllib3            | 2.5.0      | HTTP client library                |

## Installation

Prophecy provides a bundled ZIP file containing all required dependencies. This simplifies installation by including all libraries in a single package.

Access the bundle from the Prophecy public S3 bucket:

```text theme={null}
https://prophecy-public-bucket.s3.us-east-2.amazonaws.com/python-prophecy-libs/prophecy-libs-livy-bundle-<prophecy-libs-version>.zip
```

Replace `<prophecy-libs-version>` with the version number from your project dependencies.

<Note>The bundle version must match your project's ProphecyPythonLibs version.</Note>

<Steps>
  <Step title="Set the fabric's resolution mode">
    You'll need to configure your Livy fabric to use the bundled library file. There are two ways to do this.

    **Option A:** Use the Prophecy public bucket as the artifactory.

    * Set **Resolution mode** to **Custom Artifactory**.
    * Set the **Artifactory URL** to the provided bucket URL.

    <Frame>
      <img
        src="https://mintcdn.com/prophecy-62973bd0/1-5b5YWF3RbwE2_x/data-engineering/fabrics/spark-provider/livy/img/resolution-mode-livy.png?fit=max&auto=format&n=1-5b5YWF3RbwE2_x&q=85&s=7c9b6151c1aa0207e779da6acf88e119"
        alt="Livy resolution
mode"
        width="1698"
        height="846"
        data-path="data-engineering/fabrics/spark-provider/livy/img/resolution-mode-livy.png"
      />
    </Frame>

    **Option B:** Host your own artifactory.

    * Download the bundle file from the bucket.
    * Upload it to your own infrastructure.
    * Set the **Resolution mode** to **File System**.
    * Set the **Path** to the location of the bundled library file.

    Set the resolution mode to **File System** and provide the path to the bundled library file.
  </Step>

  <Step title="Verify installation">
    After installation, verify that the libraries are available by running a test import in a Python session on your Livy cluster.
  </Step>
</Steps>
