This page provides instructions for installing Docling and its dependencies. It covers the basic installation, optional feature dependencies (extras), system-level requirements, and platform-specific considerations.
For information about using Docling after installation, see Quick Start. For details on configuring GPU acceleration, see GPU and Hardware Acceleration.
The simplest way to install Docling is via pip:
This installs the core Docling package with support for:
Python Version Requirements:
Platform Support:
Sources: README.md58-68 .github/workflows/checks.yml65-333
Docling uses Python extras to provide optional functionality. The following table summarizes available extras and their use cases:
| Extra | Purpose | Key Packages | System Dependencies |
|---|---|---|---|
easyocr | EasyOCR engine for scanned PDFs/images | easyocr | None (pure Python/PyTorch) |
tesserocr | Tesseract OCR engine (fastest, most accurate) | tesserocr | tesseract-ocr, libleptonica-dev, libtesseract-dev, Python dev headers |
rapidocr | RapidOCR engine (lightweight) | rapidocr-onnxruntime | None (ONNX runtime) |
vlm | Vision Language Models (GraniteDocling, etc.) | transformers, accelerate, torch, mlx (macOS) | None (model weights downloaded on first use) |
asr | Audio transcription (Whisper models) | transformers, torch | ffmpeg |
To install Docling with specific extras, use square brackets:
Note: The tesserocr extra requires compilation and system dependencies (see below). If you don't have Python development headers installed, you can omit tesserocr and use easyocr or rapidocr instead.
Sources: .github/workflows/checks.yml310-385
The tesserocr extra provides the fastest and most accurate OCR but requires system-level packages:
Ubuntu/Debian:
macOS (Homebrew):
Language Packs: Install additional language packs as needed:
Environment Variable: Set TESSDATA_PREFIX to point to the tessdata directory:
Audio and video transcription (ASR pipeline) requires FFmpeg:
Ubuntu/Debian:
macOS:
LibreOffice is used as a fallback for complex Office documents:
Ubuntu/Debian:
Note: LibreOffice is not required for basic DOCX/XLSX/PPTX support, which uses pure Python libraries (python-docx, openpyxl, python-pptx).
Sources: .github/workflows/checks.yml82-223
Installation Flow Diagram - Shows how the pip install command resolves to core and optional dependencies, and where model artifacts are cached.
Sources: .github/workflows/checks.yml96-243 README.md58-68
Component to Extra Mapping - Shows which installation extras enable which processing pipelines and model components.
Sources: README.md31-43 docs/examples/minimal_vlm_pipeline.py10-11
Docling provides optimized support for Apple Silicon through the MLX framework:
MLX Runtime for VLMs: When installing the vlm extra on macOS arm64, the mlx package is included for accelerated vision language model inference.
Automatic Selection: The VlmPipeline automatically detects Apple Silicon and uses MLX when available, falling back to Transformers otherwise.
Installation:
Usage: The MlxVlmEngineOptions class configures MLX-specific parameters. See Inline VLM Models for details.
For GPU-accelerated inference on NVIDIA, AMD, or Intel GPUs:
PyTorch Backend: Install PyTorch with the appropriate CUDA/ROCm support before installing Docling:
Install Docling: Then install Docling with desired extras:
Configuration: Set the AcceleratorDevice in pipeline options. See GPU and Hardware Acceleration for detailed configuration.
Docling works on Windows x86_64 and arm64 with the following considerations:
Sources: docs/examples/minimal_vlm_pipeline.py82-90 README.md67
After installation, verify Docling is working correctly:
On first use, Docling downloads ML models to cache directories:
~/.cache/huggingface/hub/ (EGRET, HERON)~/.cache/huggingface/hub/ (GraniteDocling, etc.)~/.EasyOCR/model/These models are downloaded once and reused for subsequent runs.
Sources: .github/workflows/checks.yml98-174 README.md73-93
The Docling project uses uv for development and CI/CD. To install with uv:
Benefits of uv:
Sources: .github/workflows/checks.yml35-95 README.md17
Issue: tesserocr fails to compile
python3-dev on Ubuntu)easyocr or rapidocr insteadIssue: Models not downloading
export HF_HUB_DOWNLOAD_TIMEOUT=90docling models download CLI to manually download modelsIssue: Out of memory during VLM inference
VlmPipelineOptionsSources: .github/workflows/checks.yml13-14 .github/workflows/checks.yml323-396
After installing Docling:
Sources: README.md71-85 docs/index.md23-34
Refresh this wiki