Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 8.7s · import 0.000s · 316MB
410MB installed
● package 410MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
OCR
✓ from img2table.ocr import PaddleOCR, TesseractOCR
✗ from img2table.ocr import PaddleOcr
Wrong casing; class is PaddleOCR (capital O, C, R).
Document
✓ from img2table.document import Image, PDF
✗ from img2table import Image
Image and PDF are classes inside img2table.document, not top-level.
Extract tables from an image using PaddleOCR.
import os
from img2table.document import Image
from img2table.ocr import PaddleOCR
# Use environment variable for API key if needed
ocr = PaddleOCR(lang='en', api_key=os.environ.get('PADDLE_OCR_KEY', ''))
img = Image(src='table.png')
tables = img.extract_tables(ocr=ocr)
print(tables)
img2table --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'paddleocr'
PaddleOCR is an extra dependency, not installed by default with img2table.
ImportError: cannot import name 'PaddleOCR' from 'img2table.ocr'
Using wrong casing; correct class name is PaddleOCR (capital O, C, R).
fixUse: from img2table.ocr import PaddleOCR
AttributeError: 'Image' object has no attribute 'extract_tables'
Incorrect import; Image class is not in top-level package.
fixUse: from img2table.document import Image
Upgrade
Version history
2.0.0latest on PyPI · released May 10, 2026
Audit
Dependencies
No dependency data recorded yet.