--- id: tesserocr version: "2.11.0" license: MIT license_treatment: permissive maintenance: active --- # tesserocr — A simple, Pillow-friendly, Python wrapper around tesseract-ocr API using Cython License: permissive · Maintenance: active · Downloads: 562.5K/mo ## What it is and what it does tesserocr is a Python wrapper around the Tesseract OCR engine, built with Cython to provide direct access to Tesseract's C++ API. It extracts text and metadata from images, supporting both file paths and Pillow Image objects. The package is designed for concurrent use with Python's threading module, releasing the GIL during image processing to enable true parallel execution. The library exposes both high-level convenience functions (like `image_to_text()` and `file_to_text()`) and a lower-level API (`PyTessBaseAPI`) for advanced use cases such as component detection, orientation/script detection, and per-symbol confidence scores. It requires system libraries libtesseract and libleptonica to be installed separately on Unix-like systems, though Windows wheels bundle these dependencies. Use it for: - Batch processing scanned documents or photographs to extract searchable text for archival systems - Building concurrent image-to-text pipelines that leverage threading for high-throughput OCR workflows - Detecting document orientation and script language before applying language-specific OCR models - Extracting text regions with per-character confidence scores for quality control in document processing - Integrating OCR into data pipelines that already use Pillow for image manipulation ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. tesserocr wraps Tesseract's C++ OCR engine via Cython, extracting text and metadata from images with support for Pillow objects and concurrent processing through Python's threading module. Yes, if you need OCR and can install system libraries. tesserocr is actively maintained, production-stable, has no known vulnerabilities, and offers genuine concurrency advantages over pure-Python OCR libraries. The medium install friction (external C++ dependencies) is the main trade-off; Windows users should use Conda or pre-built wheels to avoid compilation. ## Install pip install tesserocr uv add tesserocr poetry add tesserocr ## Installing tesserocr Before you install: Medium install friction due to compiled C++ dependencies. Requires libtesseract (>=3.04) and libleptonica (>=1.71) to be installed separately on Linux/macOS, or pre-packaged wheels on Windows. Package is actively maintained with recent releases and builds available for Python 3.9–3.14 across multiple platforms. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install tesserocr from tesserocr import PyTessBaseAPI with PyTessBaseAPI() as api: api.SetImageFile('sample.jpg') print(api.GetUTF8Text()) Requires libtesseract (>=3.04) and libleptonica (>=1.71) libraries installed on the system; on Linux/Ubuntu install via apt-get, on macOS via Homebrew, or use Conda on Windows. Verify before relying: - Whether traineddata files are bundled or must be downloaded separately for language support - Performance characteristics when processing large batches of images - Compatibility with PyPy implementation beyond CPython ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 562.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags optical character recognition OCR, extract text from images, tesseract python wrapper, image to text conversion, concurrent OCR processing, pillow image recognition, document text extraction, ocr, image-processing, concurrent [View on SkillFed](https://skillfed.io/packages/tesserocr) · [View on PyPI](https://pypi.org/project/tesserocr/)