Skip to main content
Developer Guide

Install Tesseract OCR
in minutes.

A complete, tested installation guide for Windows, macOS, Linux, WSL2, Docker and Conda — including PATH setup, language data, verification and the fixes for the errors people actually hit.

Quick install (one command)

Copy the command for your platform. Language data and PATH notes follow below.

Windows

Community package managers, or the UB Mannheim installer.

powershell

> winget install UB-Mannheim.TesseractOCR

macOS

Homebrew is the recommended method.

zsh

$ brew install tesseract

Ubuntu / Debian

Available in the standard repositories.

bash

$ sudo apt install tesseract-ocr

Which installation method should I use?

Pick the row that matches your environment. The rest of this guide covers each in detail.

MethodBest forLanguage dataAdmin rights
UB Mannheim installer (Windows)Most Windows desktop usersChoose during setupYes (system-wide)
winget / scoop / chocoScripted or user-level Windows installsAdd separatelyscoop: no
Homebrew / MacPorts (macOS)macOS developmenttesseract-langNo
apt / dnf / pacman / apkLinux servers and desktopsPer-language packagesYes (sudo)
WSL2Windows users who also train modelsapt packagesNo
DockerReproducible services and CIBaked into the imageNo
CondaData-science environmentsconda-forgeNo

Install on Windows

Tesseract is not trivially compiled on Windows. Use the community installer or a package manager, then add it to your PATH.

Option A — UB Mannheim installer (recommended)

The UB Mannheim project publishes the de facto standard Windows builds for Tesseract 5.x, in both 64-bit and 32-bit. The installer includes the training tools and lets you select additional language data during setup.

  1. Download the latest tesseract-ocr-w64-setup-5.x.exe from the UB Mannheim page.
  2. Run the installer. When prompted for components, tick the languages you need (or all of them).
  3. Install to the default location, C:\Program Files\Tesseract-OCR.
  4. Add that folder to your PATH (see below), then restart your terminal.

Option B — package managers

powershell

> winget search tesseract

> winget install UB-Mannheim.TesseractOCR

> scoop install tesseract

> choco install tesseract

Package IDs change over time — run winget search tesseract or scoop search tesseract first if a command is not found.

Add Tesseract to the PATH (the step everyone misses)

If you installed with the UB Mannheim installer, tesseract will not be found until its folder is on the PATH.

  1. Open the Start Menu, search for Environment Variables and choose Edit the system environment variables.
  2. Click Environment Variables…, then under System variables select Path and click Edit.
  3. Click New and add C:\Program Files\Tesseract-OCR.
  4. Click OK everywhere and fully restart your terminal (and any IDE) so the new PATH is picked up.
verify

> tesseract --version

Install on macOS

Homebrew is the recommended method on both Apple Silicon and Intel.

zsh

$ brew install tesseract

$ brew install tesseract-lang # all language data

Homebrew installs binaries under /opt/homebrew/bin on Apple Silicon and /usr/local/bin on Intel. Language data lives in the tessdata directory — find it with brew info tesseract.

MacPorts alternative

zsh

$ sudo port install tesseract

$ sudo port install tesseract-langcode # e.g. tesseract-fra

Install on Linux

Every major distribution ships Tesseract in its official repositories.

Debian / Ubuntu / Mint

bash

$ sudo apt update

$ sudo apt install tesseract-ocr libtesseract-dev

$ sudo apt install tesseract-ocr-all # optional: every language

If apt cannot find the package, enable the universe repository. libtesseract-dev is only needed when compiling against the API.

Fedora / RHEL

bash

$ sudo dnf install tesseract tesseract-devel tesseract-langpack-eng

Arch / Manjaro

bash

$ sudo pacman -S tesseract tesseract-data-eng

Alpine

sh

$ apk add tesseract-ocr tesseract-ocr-dev tesseract-ocr-data-eng

Need a newer version than your distribution ships? Compile from source following the official compilation guide. On Linux you can also use the tesseract-ocr-devel PPA.

Install on Windows with WSL2

WSL2 gives you a full Linux environment inside Windows — the easiest path if you also want to train custom models.

powershell → ubuntu

> wsl --install -d Ubuntu

$ sudo apt update && sudo apt install tesseract-ocr tesseract-ocr-all libtesseract-dev

Install with Docker

For reproducible services and CI, bake Tesseract into an image. This gives you a pinned engine and language set.

Create a Dockerfile:

Dockerfile
FROM ubuntu:24.04
RUN apt-get update \
 && apt-get install -y --no-install-recommends \
      tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra libtesseract-dev \
 && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["tesseract"]
bash

$ docker build -t tesseract .

$ docker run --rm -v "$PWD:/data" tesseract /data/image.png /data/out

Mount a volume so Tesseract can read your image and write out.txt back to the host. Add more tesseract-ocr-<lang> packages to the Dockerfile for extra languages.

Install with Conda

Ideal for data-science environments where you cannot use system package managers.

bash

$ conda install -c conda-forge tesseract

Install language data (tessdata)

The engine ships with English by default. Add more languages as package data or as .traineddata files.

Install language packages

bash

$ sudo apt install tesseract-ocr-fra tesseract-ocr-deu # Debian/Ubuntu

$ brew install tesseract-lang # macOS (all)

$ sudo dnf install tesseract-langpack-fra # Fedora

Install a .traineddata file manually

  1. Download the language file from one of the official repositories: tessdata_fast (speed), tessdata_best (accuracy), or tessdata (legacy).
  2. Copy the .traineddata file into your tessdata directory (for example C:\Program Files\Tesseract-OCR\tessdata, /usr/share/tesseract-ocr/5/tessdata, or $(brew --prefix)/share/tessdata).
  3. If the data lives elsewhere, point the engine at it with the TESSDATA_PREFIX environment variable.
  4. List available languages to confirm: tesseract --list-langs.
RepositoryTrade-offUse when
tessdata_fastSmallest and fastest, slightly lower accuracyReal-time or high-volume pipelines
tessdata_bestHighest accuracy, slower and largerArchival or accuracy-critical work
tessdataLegacy + LSTM, supports --oem 0Old models or legacy compatibility

Verify the installation

Run these three checks before moving on. If any fails, see the troubleshooting table below.

verify

$ tesseract --version

$ tesseract --list-langs

$ tesseract sample.png stdout -l eng

A successful run prints the version, lists eng (plus any installed languages), and outputs recognised text from your image.

Upgrade, manage and uninstall

Keep the engine current, or cleanly remove it.

TaskWindowsmacOSLinux
Upgradewinget upgrade / rerun installerbrew upgrade tesseractsudo apt upgrade tesseract-ocr
Uninstallwinget uninstall UB-Mannheim.TesseractOCRbrew uninstall tesseractsudo apt remove tesseract-ocr
Multiple versionsKeep one on PATHAvoid mixing brew + MacPortsUse a PPA or build from source

Troubleshooting

The failures below cover the vast majority of installation problems.

SymptomCauseFix
tesseract: command not found / "not recognized"Install directory not on PATHAdd C:\Program Files\Tesseract-OCR (Windows) or the brew bin (macOS) to PATH and restart the terminal.
Error opening data file .../eng.traineddataLanguage data missing or wrong pathInstall the language package or set TESSDATA_PREFIX to the folder containing eng.traineddata.
TesseractNotFoundError (Python)pytesseract cannot find the binarySet pytesseract.pytesseract.tesseract_cmd to the full path, or fix PATH.
Wrong version reportedMore than one install on PATHReorder PATH or remove the duplicate; run which -a tesseract / where tesseract.
Permission deniedSystem install without privilegesUse sudo on Linux, or scoop/Conda for a user-level install.
Docker cannot find the image fileVolume not mountedMount the host folder with -v "$PWD:/data" and reference /data/... inside the container.

Installation FAQ

How do I install Tesseract OCR on Windows?

Download the UB Mannheim installer for Tesseract 5.x, run it, add C:\Program Files\Tesseract-OCR to your PATH, and verify with tesseract --version. You can also use winget, scoop or chocolatey.

How do I install Tesseract OCR on Ubuntu?

Run sudo apt update && sudo apt install tesseract-ocr libtesseract-dev. Enable the universe repository if the package is not found, and install tesseract-ocr-all for every language.

Where does Tesseract get installed?

Windows: C:\Program Files\Tesseract-OCR. macOS Homebrew: /opt/homebrew (Apple Silicon) or /usr/local (Intel). Linux: typically /usr/bin/tesseract, with language data under /usr/share/tesseract-ocr/.

Do I need to install anything for Python?

Yes. The Python wrapper pytesseract calls the Tesseract binary, so install the engine first, then pip install pytesseract pillow. The documentation shows a minimal example.

Can I install Tesseract without administrator rights?

Yes. Use scoop or a portable build on Windows, or conda install -c conda-forge tesseract anywhere. These install into user-writable locations.

Is Tesseract free to install and use commercially?

Yes. Tesseract is released under the Apache 2.0 licence and is free for personal, academic and commercial use.

Once the engine is installed, learn how to run it.