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.

On this page

    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

    Video: install Tesseract and fix “not recognized”

    A 4-minute walkthrough for Windows, macOS and Linux, including the PATH setup most guides skip.

    4:05 · English narration with on-screen captions

    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.

    For example, this is the real output on Ubuntu 24.04, where apt installs Tesseract 5.3.4:

    Ubuntu 24.04
    $ tesseract --version
    tesseract 5.3.4
     leptonica-1.82.0
      libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.1.5) : libpng 1.6.43 : libtiff 4.5.1 : zlib 1.3 : libwebp 1.3.2 : libopenjp2 2.5.0
     …
    $ tesseract --list-langs
    List of available languages in "/usr/share/tesseract-ocr/5/tessdata/" (2):
    eng
    osd

    Version numbers and the library list differ from system to system; any 5.x version is fine. The folder in the first line of --list-langs is where Tesseract looks for .traineddata files, so extra languages go there. osd is the orientation and script detection model that the package installs alongside English.

    Calling Tesseract from C# or .NET? The NuGet packages contain Windows DLLs only, so on Linux you link these system libraries yourself: see the C# / .NET guide.

    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.