megaparse is currently unusable due to tightly coupled and broken dependencies
Author: ivandataCreated Jun 14, 2025Updated Jun 14, 2025
Labelsbugdocumentation
Summary
The installation of megaparse fails in real-world environments due to:
- Strict version locks on unavailable dependencies
- Runtime crashes from unnecessary GUI-related requirements (like OpenCV)
- Missing or undocumented system-level dependencies (despite a partial mention in README)
- Lack of a working version matrix or pinned compatible configuration
- And — critically — a lack of working examples or sufficient documentation, turning setup into frustrating guesswork
1. unstructured==0.15.0 is required — but it's no longer on PyPI
megaparse==0.0.55depends strictly onunstructured==0.15.0- That version has been yanked from PyPI
- Installing
megaparsenow results in a resolution error or missing import crash
❗ There’s no published workaround or updated version that relaxes this constraint.
2. cv2 is included (via onnxtr?) and breaks Docker/headless environments
Even though the library doesn’t directly rely on GUI:
- OpenCV is included implicitly
- Runtime fails with:
ImportError: libGL.so.1: cannot open shared object file: No such file or directory - This can be fixed with
opencv-python-headless, but that’s not exposed as a selectable install path.
4. No installable version matrix exists
Because of strict == version locks, there's no way to:
- Downgrade to a working set of packages
- Use a “core” subset of megaparse (e.g. no PDF, no OCR)
- Select only non-broken components (e.g. skip unstructured/PDF parsing)
5. Lack of documentation and examples makes setup exhausting
There are no:
- Minimal working examples
- End-to-end examples with realistic files
- Clear instructions on configuring runtime dependencies (e.g. OpenAI keys, OCR paths)
As a result, getting megaparse to work involves blind debugging and reverse-engineering library internals.
I’ve personally wasted an enormous amount of time trying to get this running, only to hit a dead end with ImportError, ResolutionImpossible, and broken package graphs.
Recommendations
- Replace hard == locks with version ranges
- Use extras_require to isolate PDF/image/ONNX features
- Vendor known working unstructured code if necessary
- Provide a working Dockerfile or requirements.lock setup for reproducibility
- Add runtime checks for system dependencies (e.g. shutil.which('tesseract'))
- Publish supported versions of each transitive dependency (pdfminer.six, pdfplumber, etc.)
- Include minimal working examples to validate installation and usage
Thanks for the work on this project, the functionality looks promising, but the current state blocks usage entirely.
Source: QuivrHQ/MegaParse