Skip to content

[Bug]: Docling fails to build using Python 3.13.14 on Ubuntu Linux 24.04.4 #1948

Description

@mpawlow

OpenRAG Version

Latest from main (commit 08fe04e)

Deployment Method

Local development (make dev)

Operating System

Ubuntu 24.04.4 LTS

Python Version

3.13.14

Affected Area

Ingestion (document processing, upload, Docling)

Bug Description

Docling fails to build using Python 3.13.14 on Ubuntu Linux 24.04.4

Steps to Reproduce

  1. Run make docling
    • BUG: Build failure occurs
    • See: Relevant Logs
    • WORK-AROUND:
      • Run: sudo apt-get install -y python3.12-dev

Expected Behavior

  • Build to pass

Actual Behavior

  • Build fails

Relevant Logs

  Starting docling-serve...
  Using CPython 3.12.3 interpreter at: /usr/bin/python3.12
  Removed virtual environment at: .venv
  Creating virtual environment at: .venv
        Built openrag @ file:///home/mpawlow/git/openrag
    × Failed to build `aiohttp==3.14.0`
    ├─▶ The build backend returned an error
    ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

  ...
        [stderr]
        *********************
        * Accelerated build *
        *********************
        /home/mpawlow/.cache/uv/builds-v0/.tmp0rI1Pd/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
        !!

                ********************************************************************************
                Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).

                By 2027-Feb-18, you need to update your project and remove deprecated calls
                or your builds will no longer be supported.

                See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
                ********************************************************************************

        !!
          corresp(dist, value, root_dir)
        /home/mpawlow/.cache/uv/builds-v0/.tmp0rI1Pd/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:55: SetuptoolsDeprecationWarning: 'tool.setuptools.license-files' is deprecated in
        favor of 'project.license-files' (available on setuptools>=77.0.0).
        !!

                ********************************************************************************

                By 2027-Feb-18, you need to update your project and remove deprecated calls
                or your builds will no longer be supported.

                See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-files for details.
                ********************************************************************************

        !!
          _apply_tool_table(dist, config, filename)
        warning: no previously-included files matching '*.pyc' found anywhere in distribution
        warning: no previously-included files matching '*.pyd' found anywhere in distribution
        warning: no previously-included files matching '*.so' found anywhere in distribution
        warning: no previously-included files matching '*.lib' found anywhere in distribution
        warning: no previously-included files matching '*.dll' found anywhere in distribution
        warning: no previously-included files matching '*.a' found anywhere in distribution
        warning: no previously-included files matching '*.obj' found anywhere in distribution
        warning: no previously-included files found matching 'aiohttp/*.html'
        no previously-included directories found matching 'docs/_build'
        aiohttp/_websocket/mask.c:19:10: fatal error: Python.h: No such file or directory
           19 | #include "Python.h"
              |          ^~~~~~~~~~
        compilation terminated.
        aiohttp/_http_writer.c:19:10: fatal error: Python.h: No such file or directory
           19 | #include "Python.h"
              |          ^~~~~~~~~~
        compilation terminated.
        aiohttp/_websocket/reader_c.c:19:10: fatal error: Python.h: No such file or directory
           19 | #include "Python.h"
              |          ^~~~~~~~~~
        compilation terminated.
        aiohttp/_find_header.c: In function ‘find_header’:
        aiohttp/_find_header.c:21:19: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
           21 |     char *pchar = str;
              |                   ^~~
        aiohttp/_find_header.c:9867:1: warning: label ‘missing’ defined but not used [-Wunused-label]
         9867 | missing:
              | ^~~~~~~
        aiohttp/_http_parser.c:19:10: fatal error: Python.h: No such file or directory
           19 | #include "Python.h"
              |          ^~~~~~~~~~
        compilation terminated.
        error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

        hint: This error likely indicates that you need to install a library that provides "Python.h" for `aiohttp@3.14.0`
    help: `aiohttp` (v3.14.0) was included because `openrag` (v0.5.0) depends on `aiohttp`
  make: *** [Makefile:659: docling] Error 1

Screenshots

  • N/A

Additional Context

  • Likely due to the .python-version value being switched to 3.12 for the UBI9 base image security fixes

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported before.
  • I have provided all the requested information.

Metadata

Metadata

Assignees

Labels

bug🔴 Something isn't working.

Type

Fields

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions