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

# Prerequisites

To use Python in Sync, install the following dependencies on the server that hosts the application.

* Python 3: Download and install a supported Python release (3.10 or later) from the [Python](https://www.python.org/downloads/) website.
* Java Embedded Python (Jep) 4.2.2: Jep is available from multiple sources, depending on your environment and installation method.

For details about how to use Python scripting in Sync, including script execution, available inputs, and practical examples, see [Writing Python](https://docs.sync.cdata.com/26.4/en/events/python-scripting/writing-python.md).

Setting up Python in Sync involves two prerequisite steps: installing Jep and configuring your environment.

## Installing Jep for Java

*Jep* is a library that allows you to embed the Python interpreter into Java applications. It enables two-way integration between Java and Python, which lets Java programs run Python code, share variables, and even call functions across languages.

You can find Jep and installation instructions on the [Jep GitHub page](https://github.com/ninia/jep).

> [!NOTE]
>
> Before you can install Jep, you need to install `pip`.
>
> * For Debian/Ubuntu-based distributions, `pip` can typically be installed using the following command:
>
>   ```sh theme={null}
>   sudo apt-get install python3-pip
>   ```
>
> * For other distributions, see the appropriate documentation for `pip` installation.

Once Python and `pip` are installed, use the following command to install Jep:

```sh theme={null}
python3 -m pip install jep==4.2.2
```

> [!NOTE]
>
> On some Linux distributions, `pip` might install Jep to `/usr/local/lib64/python3.*/site-packages/jep/` rather than the expected `PythonHome/lib/site-packages/jep/` path. If Sync cannot locate Jep automatically, set the `LibraryPath` environment variable to point to the actual Jep installation directory.

## Configuring Your Environment

To configure your environment, set the `PYTHONHOME` environment variable to the root directory of your Python installation. This variable directs Sync to the Python interpreter on your system.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.