Multimodal Chat with File using OCR > Introduction to Multimodal Chat with File using OCR recipe > Prerequisites
  

Prerequisites

Before you run the Multimodal Chat with File using OCR agent, import the following supported Python external libraries from the PIL package into the directory where your Secure Agent is installed:
To install the required libraries, install Tesseract, and then install the unstructured libraries.

Step 1. Install Tesseract

You can install Tesseract on different operating systems.
For example, to install Tesseract on Ubuntu/Debian, run the following commands:
sudo apt update
sudo apt-get install tesseract-ocr
To install Tesseract on Fedora, run the following command:
sudo dnf install tesseract

Step 2. Install the unstructured libraries

  1. 1Run the following command to navigate to the following Secure Agent directory on your machine:
  2. cd <Secure Agent installation directory/apps/AIAgentRuntime
  3. 2Run the following command once to install the unstructured library with OCR support:
  4. ./<Latest AI Agent Runtime service version>/pythonRuntime/python/bin/pip3.13 install unstructured[<file extension>] --target data/external-libs/
    For example, to install the pytesseract, PyMuPDF, and Pillow libraries, run the following command:
    ./<Latest AI Agent Runtime service version>/pythonRuntime/python/bin/pip3.13 install --target=/root/infaagent/apps/AIAgentRuntime/data/external-libs/ pytesseract PyMuPDF Pillow
For more information, see External library installation for custom Python code.