Install Docling

The complete, verified path from zero to your first conversion โ€” Python setup, pip vs uv, virtual environments, every optional extra, PyTorch CPU / CUDA / MPS builds, Tesseract system packages, model downloads, verification and per-OS fixes. Works on macOS, Linux and Windows (x86_64 and arm64).

bash โ€” install in 30 seconds
$python -m venv .venv && source .venv/bin/activate
$pip install docling
$docling convert sample.pdf --to md
โœ“Python 3.10+ (64-bit) on Windows, macOS & Linux. Prefer uv on Windows for pre-built wheels.
โœ“~2โ€“4 GB for first-run models, then fast & fully offline.
โœ“CPU works everywhere; CUDA / MPS only adds speed.
1
Choose your path

Which install path should you choose?

Your situationStart hereWhy
Just want to convert PDFs locallypip install doclingCore package; no Docker, no server needed.
On Windows and hitting compiler errorsWindows guide + uv add doclinguv resolves pre-built wheels and skips MSVC.
Need an HTTP API for an appDocker / docling-serve guideOfficial container exposes /v1/convert/source, /docs, /ui.
Need GPU speed on LinuxLinux guideCUDA-enabled torch + --device cuda.
On a MacmacOS guideApple Silicon uses MPS; Intel needs pinned torch.
Scanned PDFs / OCRExtras table + OCR guidePick RapidOCR, EasyOCR, Tesseract or OcrMac.
2
Before you start

Requirements (all platforms)

  • Python 3.10 or newer, 64-bit. Python 3.9 support was dropped in Docling 2.70.0. Very new Python releases may lag until Docling adds wheels โ€” check the PyPI release history if your version has no wheel.
  • pip 23+ or Astral uv. uv is faster and avoids most Windows compiler issues.
  • ~2โ€“4 GB free disk for models on first run (layout, table structure, OCR models).
  • Working internet on first run so models can download (see model cache for offline machines).
  • Optional: Tesseract system binary (only if you choose a Tesseract engine), CUDA drivers (only for NVIDIA GPU), Docker (only for docling-serve).
python --version && pip --version
โ“˜If that prints anything below 3.10, install a newer Python first โ€” everything below assumes 3.10+.
3
Isolate dependencies

Create an isolated environment (recommended)

Docling pulls in PyTorch, ONNX and OCR libraries. Never install it into your system Python โ€” one conflicting torch or numpy can break other tools. Pick one:

Option A โ€” venv + pip (everywhere)

python -m venv .venv
source .venv/bin/activate

Option B โ€” uv (fastest, best on Windows)

uv venv --python 3.12
uv add docling
โ“˜On Windows PowerShell use .venv\Scripts\Activate.ps1 instead of the source line.
4
Install the package

Quick install: pip vs uv

Standard (pip):

pip install docling

With uv (resolves pre-compiled wheels, avoids C++ build tools):

uv add docling

Both install the same package from PyPI on macOS, Linux and Windows (x86_64 + arm64). For the full official instructions see the official installation docs.

5
Add capabilities

Every optional extra, explained

The base package covers default conversion. Anything needing heavy third-party deps ships as an extra, installed with pip install "docling[NAME]" (combine with commas: "docling[rapidocr,vlm]").

ExtraWhat it addsInstall
rapidocrRapidOCR engine (ONNX Runtime backend) โ€” easiest cross-platform OCRpip install "docling[rapidocr]"
easyocrEasyOCR engine โ€” pure-Python install, good multilingual coveragepip install "docling[easyocr]"
tesserocrFast Tesseract binding (needs system Tesseract first, see below)pip install "docling[tesserocr]"
ocrmacApple Vision OCR โ€” macOS onlypip install "docling[ocrmac]"
vlmVision-language-model pipeline deps (Granite Docling etc.)pip install "docling[vlm]"
asrAudio-speech-recognition pipeline (Whisper)pip install "docling[asr]"
htmlrenderHTML page rendering for the HTML backendpip install "docling[htmlrender]"
feat-ocr-nemotronNVIDIA Nemotron OCR โ€” Linux x86_64 + Python 3.12 + CUDA 13.x onlypip install "docling[feat-ocr-nemotron]" --extra-index-url https://download.pytorch.org/whl/cu130 --index-strategy unsafe-best-match
mac_intelPinned torch compatible with Intel Macs (PyTorch โ‰ฅ2.6 drops Intel wheels)pip install "docling[mac_intel]"
โ“˜OCR engine choice matters: RapidOCR and EasyOCR install with pip alone; Tesseract variants need the system binary first. Compare engines in the OCR guide.
6
Acceleration

PyTorch builds: CPU-only, CUDA, MPS, Intel Macs

Docling models run on PyTorch. The default wheel works for most people, but three cases need a special build:

  • Linux CPU-only servers: avoid the large CUDA wheel and install the small CPU build:
    pip install docling --extra-index-url https://download.pytorch.org/whl/cpu
    uv users pin torch to the CPU index in pyproject.toml (see the Linux guide for the exact snippet).
  • NVIDIA GPU on Linux/Windows: install a CUDA-enabled torch for your CUDA version, then select it with --device cuda. WSL2 is the simplest CUDA path on Windows โ€” full steps in the Windows guide.
  • macOS Intel (x86_64): PyTorch 2.6.0+ ships no Intel wheels. Pin the last good build and stay on Python โ‰ค3.12:
    uv add torch==2.2.2 torchvision==0.17.2 docling
    or
    pip install "docling[mac_intel]"
  • Apple Silicon: works out of the box; select the MPS backend with --device mps when needed (see the macOS guide).
7
System dependency

Tesseract system packages + TESSDATA_PREFIX

Only needed if you pick a Tesseract engine. Install the binary with your OS package manager before the pip extra, then point TESSDATA_PREFIX at the language data (note the trailing slash):

OSInstallTESSDATA_PREFIX example
macOS (Homebrew)brew install tesseract leptonica pkg-config/opt/homebrew/share/tessdata/
Ubuntu / Debiansudo apt-get install tesseract-ocr tesseract-ocr-eng libtesseract-dev libleptonica-dev pkg-configfrom dpkg -L tesseract-ocr-eng | grep tessdata$
RHEL / Fedorasudo dnf install tesseract tesseract-devel tesseract-langpack-eng tesseract-osd leptonica-devel/usr/share/tesseract/tessdata/
WindowsInstall UB Mannheim build, add to PATHset TESSDATA_PREFIX to its tessdata\ folder
!If tesserocr fails to build, try pip uninstall tesserocr then pip install --no-binary :all: tesserocr.
8
Confirm it works

Verify your installation

Run these three checks in order โ€” each one isolates a different failure layer:

docling --help
python -c "import docling; print(docling.__version__)"
docling convert sample.pdf --to md
โœ“Use a small digital (text) PDF for the first test so OCR and GPU are out of the equation. Then try --to json, --to html, and --ocr-engine rapidocr to confirm each layer. If any step fails, match the error in section 11 or the troubleshooting reference.
9
Cache & offline

First run downloads models โ€” plan for it

  • The first conversion downloads layout, table-structure and OCR models โ€” expect it to be slow once, then fast.
  • Keep a stable connection for that first run; a partial download leaves a broken cache โ€” just re-run.
  • Pre-download everything ahead of time with
    docling-tools models download --all
  • Point the cache at a writable disk with DOCLING_CACHE_DIR if the default location is read-only or too small.
  • Air-gapped machines: download on a connected host, then copy the cache directory over.
10
Stay current

Upgrade, pin and uninstall

pip install -U docling
pip install "docling==2.129.0"
pip uninstall docling
โ“˜Pin an exact version in production (requirements.txt, lockfile or container tag) so a model or CLI change cannot surprise you. This site is verified against the version in the badge below.
11
Troubleshoot

Fix the 5 most common install failures

  • Microsoft Visual C++ 14.0 is required (Windows): switch to uv add docling for pre-built wheels, or install Build Tools via winget install Microsoft.VisualStudio.2022.BuildTools with the C++ workload. Details in the Windows guide and troubleshooting.
  • Python version errors: create a fresh env with 3.10โ€“3.12 (uv venv --python 3.12). Python 3.9 is unsupported since 2.70.0.
  • OCR extra fails: use rapidocr or easyocr (pip-only); for Tesseract install the system binary + TESSDATA_PREFIX first.
  • GPU ignored (runs on CPU): confirm torch.cuda.is_available() is True, install a CUDA torch, pass --device cuda (MPS on Apple Silicon).
  • Out of memory / very slow: convert one file at a time, lower --num-threads, add --no-ocr for digital PDFs.
12
Answers

Installation FAQ

What Python version does Docling need?
Python 3.10 or newer, 64-bit. Support for 3.9 was dropped in 2.70.0. If you are on 3.9 or a 32-bit build, create a new environment with 3.10โ€“3.12 and reinstall.
pip or uv โ€” which should I use?
Both install the same package. uv resolves pre-compiled wheels more aggressively, so it avoids the MSVC compiler error on Windows and is faster everywhere. Use uv add docling if you already use uv; otherwise pip install docling is fine.
Do I need Docker?
No for local conversion โ€” the Python package is enough. You need Docker (or Podman) only to run docling-serve, the HTTP API server, as a container. See the Docker guide.
Do I need a GPU?
No. Everything runs on CPU. A CUDA GPU (Linux/Windows) or MPS (Apple Silicon) makes layout analysis, tables and OCR noticeably faster on long documents.
Why is the first conversion so slow?
Docling downloads its models on first use. Keep the connection alive for that run, or pre-download with docling-tools models download --all. Later runs reuse the cache.
Which OCR engine installs most easily?
RapidOCR (docling[rapidocr]) or EasyOCR (docling[easyocr]) โ€” both are pip-only. Tesseract is excellent but needs a system binary plus language data; OcrMac only works on macOS.
Can I install Docling offline?
Yes with preparation: install wheels plus the model cache on a connected machine, then transfer both. Set DOCLING_CACHE_DIR to the copied cache on the offline host.
How do I use Docling with RAG frameworks?
Install Docling first, then add the framework adapter (LangChain, LlamaIndex, Haystack). Convert to Markdown or JSON, then chunk and embed. See the RAG guide and examples.

Verified with Docling v2.129.0 · Last checked 2026-09-22 · Official source