Skip to content

[BUG: Breaking] marker-pdf cannot be installed on Python 3.14 due to surya-ocr Pillow version constraint #942

Description

@dizzlkheinz

🧨 Describe the Bug

marker-pdf cannot be installed on Python 3.14 due to a dependency version conflict. The installation fails during the Pillow build process because surya-ocr requires pillow<11.0.0,>=10.2.0, but Python 3.14 only has pre-built wheels for Pillow 12.x, and Pillow 10.x fails to build from source on Windows with Python 3.14.

📤 Output Trace / Stack Trace

Details Collecting marker-pdf Using cached marker_pdf-1.10.1-py3-none-any.whl.metadata (30 kB) Collecting anthropic<1.0.0,>=0.40.0 (from marker-pdf) Using cached anthropic-0.46.0-py3-none-any.whl.metadata (28 kB) Collecting click<9.0.0,>=8.1.7 (from marker-pdf) Using cached click-8.3.0-py3-none-any.whl.metadata (2.6 kB) Collecting filetype<2.0.0,>=1.2.0 (from marker-pdf) Using cached filetype-1.2.0-py2.py3-none-any.whl.metadata (6.5 kB) Collecting ftfy<7.0.0,>=6.2.3 (from marker-pdf) Using cached ftfy-6.3.1-py3-none-any.whl.metadata (7.3 kB) Collecting surya-ocr<0.18.0,>=0.16.0 (from marker-pdf) Using cached surya_ocr-0.17.0-py3-none-any.whl.metadata (34 kB) Collecting pillow<11.0.0,>=10.2.0 (from surya-ocr<0.18.0,>=0.16.0->marker-pdf) Using cached pillow-10.4.0.tar.gz (46.6 MB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: Pillow Building wheel for Pillow (pyproject.toml): started Building wheel for Pillow (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

× Building wheel for Pillow (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [284 lines of output]

C:\Users\name\AppData\Local\Temp\pip-build-env-79a3a2dh\overlay\Lib\site-packages\setuptools\configapply_pyprojecttoml.py:82:
SetuptoolsDeprecationWarning: project.license as a TOML table is deprecated
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-314\PIL
copying src\PIL\BdfFontFile.py -> build\lib.win-amd64-cpython-314\PIL
running build_ext
building 'PIL._imaging' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build installable wheels for some pyproject.toml based projects (Pillow)
error: subprocess-exited-with-error
× Building wheel for Pillow (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

⚙️ Environment

Please fill in all relevant details:

  • Marker version: 1.10.1 (attempting to install)
  • Surya version: 0.17.0 (dependency requirement)
  • Python version: 3.14.0
  • PyTorch version: N/A (not yet installed)
  • Transformers version: N/A (not yet installed)
  • Operating System (incl. container info if relevant): Windows 11

✅ Expected Behavior

pip install marker-pdf should successfully install all dependencies and allow marker-pdf to be used on Python 3.14.

📟 Command or Code Used

python -m pip install marker-pdf

📎 Additional Context

Root Cause

  1. Python 3.14 (released October 2024) only has pre-built wheels for Pillow 12.0.0+
  2. surya-ocr v0.17.0 constrains Pillow to <11.0.0,>=10.2.0
  3. Pillow 10.x does not have pre-built wheels for Python 3.14
  4. Building Pillow 10.x from source fails on Windows with Python 3.14 due to missing C++ build tools/compatibility issues

Impact

Users on Python 3.14 must:

  • Downgrade to Python 3.12/3.13

This affects anyone using the latest Python version and prevents adoption in environments requiring up-to-date Python
installations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: breakingCrashes, errors, anything that stops execution or is runtime-breaking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions