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.
> winget install UB-Mannheim.TesseractOCR
macOS
Homebrew is the recommended method.
$ brew install tesseract
Ubuntu / Debian
Available in the standard repositories.
$ 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.
| Method | Best for | Language data | Admin rights |
|---|---|---|---|
| UB Mannheim installer (Windows) | Most Windows desktop users | Choose during setup | Yes (system-wide) |
| winget / scoop / choco | Scripted or user-level Windows installs | Add separately | scoop: no |
| Homebrew / MacPorts (macOS) | macOS development | tesseract-lang | No |
| apt / dnf / pacman / apk | Linux servers and desktops | Per-language packages | Yes (sudo) |
| WSL2 | Windows users who also train models | apt packages | No |
| Docker | Reproducible services and CI | Baked into the image | No |
| Conda | Data-science environments | conda-forge | No |
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.
- Download the latest
tesseract-ocr-w64-setup-5.x.exefrom the UB Mannheim page. - Run the installer. When prompted for components, tick the languages you need (or all of them).
- Install to the default location,
C:\Program Files\Tesseract-OCR. - Add that folder to your PATH (see below), then restart your terminal.
Option B — package managers
> 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.
- Open the Start Menu, search for Environment Variables and choose Edit the system environment variables.
- Click Environment Variables…, then under System variables select Path and click Edit.
- Click New and add
C:\Program Files\Tesseract-OCR. - Click OK everywhere and fully restart your terminal (and any IDE) so the new PATH is picked up.
> tesseract --version
Install on macOS
Homebrew is the recommended method on both Apple Silicon and Intel.
$ 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
$ 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
$ 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
$ sudo dnf install tesseract tesseract-devel tesseract-langpack-eng
Arch / Manjaro
$ sudo pacman -S tesseract tesseract-data-eng
Alpine
$ 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.
> 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:
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"]
$ 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.
$ 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
$ 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
- Download the language file from one of the official repositories: tessdata_fast (speed), tessdata_best (accuracy), or tessdata (legacy).
- Copy the
.traineddatafile into yourtessdatadirectory (for exampleC:\Program Files\Tesseract-OCR\tessdata,/usr/share/tesseract-ocr/5/tessdata, or$(brew --prefix)/share/tessdata). - If the data lives elsewhere, point the engine at it with the
TESSDATA_PREFIXenvironment variable. - List available languages to confirm:
tesseract --list-langs.
| Repository | Trade-off | Use when |
|---|---|---|
tessdata_fast | Smallest and fastest, slightly lower accuracy | Real-time or high-volume pipelines |
tessdata_best | Highest accuracy, slower and larger | Archival or accuracy-critical work |
tessdata | Legacy + LSTM, supports --oem 0 | Old models or legacy compatibility |
Verify the installation
Run these three checks before moving on. If any fails, see the troubleshooting table below.
$ 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.
| Task | Windows | macOS | Linux |
|---|---|---|---|
| Upgrade | winget upgrade / rerun installer | brew upgrade tesseract | sudo apt upgrade tesseract-ocr |
| Uninstall | winget uninstall UB-Mannheim.TesseractOCR | brew uninstall tesseract | sudo apt remove tesseract-ocr |
| Multiple versions | Keep one on PATH | Avoid mixing brew + MacPorts | Use a PPA or build from source |
Troubleshooting
The failures below cover the vast majority of installation problems.
| Symptom | Cause | Fix |
|---|---|---|
tesseract: command not found / "not recognized" | Install directory not on PATH | Add C:\Program Files\Tesseract-OCR (Windows) or the brew bin (macOS) to PATH and restart the terminal. |
Error opening data file .../eng.traineddata | Language data missing or wrong path | Install the language package or set TESSDATA_PREFIX to the folder containing eng.traineddata. |
TesseractNotFoundError (Python) | pytesseract cannot find the binary | Set pytesseract.pytesseract.tesseract_cmd to the full path, or fix PATH. |
| Wrong version reported | More than one install on PATH | Reorder PATH or remove the duplicate; run which -a tesseract / where tesseract. |
| Permission denied | System install without privileges | Use sudo on Linux, or scoop/Conda for a user-level install. |
| Docker cannot find the image file | Volume not mounted | Mount 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.
Next steps
Once the engine is installed, learn how to run it.