Skip to content

Installation

1. Install the PaddleOCR Python package and optional dependencies

This section explains how to install, as needed, the paddleocr distribution package, optional dependency groups by capability domain, and the inference engine. This path covers running pretrained pipelines for inference locally, as well as auxiliary features such as document format conversion. Model training and model export are covered in Section 2 and are independent of the installation path above.

Python version requirement: paddleocr itself and the doc2md dependency group support Python 3.8 and later. The other optional dependency groups (doc-parser, ie, trans, all, etc.) require Python 3.9 or later due to upstream dependencies.

1.1 Install paddleocr

Install the latest paddleocr from PyPI:

# Default capabilities only: general OCR and document image preprocessing
python -m pip install paddleocr
# All optional capabilities: document parsing, document understanding,
# document translation, key information extraction, etc.
# python -m pip install "paddleocr[all]"

Or install from source (tracks the repository’s current default branch by default):

# Default capabilities only: general OCR and document image preprocessing
python -m pip install "paddleocr@git+https://github.com/PaddlePaddle/PaddleOCR.git"
# All optional capabilities: document parsing, document understanding,
# document translation, key information extraction, etc.
# python -m pip install "paddleocr[all]@git+https://github.com/PaddlePaddle/PaddleOCR.git"

1.2 Choose dependency groups by capability

Besides all, you can enable selected optional capabilities by specifying dependency groups. Each group corresponds to a capability domain (document parsing, information extraction, document translation, etc.). The available groups are:

Dependency Group Name Corresponding Functionality
doc-parser Document parsing. Extracts layout elements such as tables, formulas, seals, and images from documents. Includes model solutions such as PP-StructureV3
ie Information extraction. Extracts key information such as names, dates, addresses, and amounts from documents. Includes model solutions such as PP-ChatOCRv4
trans Document translation. Translates documents from one language to another. Includes model solutions such as PP-DocTranslation
doc2md Document-to-Markdown conversion. Quickly turns Word, Excel, and PowerPoint files into readable text
all Full functionality

The general OCR pipeline and the document image preprocessing pipeline require no extra dependency groups; document parsing, information extraction, document translation, and other capabilities follow the table above. See each pipeline’s documentation for its dependency group. For individual modules, install any dependency group that contains the module to use its basic functionality.

1.3 Install the inference engine (as needed)

PaddleOCR 3.5 uses a unified inference-engine configuration and can use backends such as PaddlePaddle and Transformers. To actually run model inference, install your chosen inference engine by following Inference Engine and Configuration.

2. Install training and export dependencies

To train models or export models, install the training-related dependencies separately. This path is a different installation dimension from the paddleocr package and optional groups in Section 1; both can coexist in one environment without mandatory isolation. Training and export depend on the PaddlePaddle framework. First install PaddlePaddle by following PaddlePaddle Framework Installation. If another inference engine (such as Transformers) is already installed in the environment, you may encounter dependency conflicts; installing in a clean environment is recommended.

Python version requirement: training and model export support Python 3.8 and later.

Clone this repository locally, then install the remaining dependencies:

git clone --depth 1 https://github.com/PaddlePaddle/PaddleOCR.git
cd PaddleOCR

Download only the latest revision of the default branch for training and export. To retrieve its full commit history later, run git fetch --unshallow inside the repository.

To use a specific version, select the branch when cloning, for example:

git clone --depth 1 --branch release/3.5 https://github.com/PaddlePaddle/PaddleOCR.git PaddleOCR-3.5
cd PaddleOCR-3.5

Choose one of these two alternatives. If GitHub is unavailable, replace the clone URL with https://gitee.com/paddlepaddle/PaddleOCR.git; the mirror may lag by 3–5 days.

Run the following command to install the remaining training dependencies:

python -m pip install -r requirements.txt

Comments