Skip to content

feat: add aarch64-linux Python wheels  #254

@LucaAngioloni

Description

@LucaAngioloni

First of all thanks for the great work on Kreuzberg!

I cannot install any of the latest RC releases for Python with pip inside a Docker container based on docker.io/python:3.13.11-slim-bookworm (host: MacOS).

I get the following output (this is me inside an interactive session to get a better output and isolate the problem; of course the installation is done in a Docker file at build time with a bunch of other requirements):

root@4ed45fa46b44:/# pip install kreuzberg==4.0.0rc21
Collecting kreuzberg==4.0.0rc21
  Downloading kreuzberg-4.0.0rc21.tar.gz (837 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 837.3/837.3 kB 6.6 MB/s  0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [57 lines of output]
      Python reports SOABI: cpython-313-aarch64-linux-gnu
      Computed rustc target triple: aarch64-unknown-linux-gnu
      Installation directory: /root/.cache/puccinialin
      Downloading rustup-init from https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init
      Checking for Rust toolchain....
      Rust not found, installing into a temporary directory

      Downloading rustup-init:   0%|          | 0.00/19.3M [00:00<?, ?B/s]
      Downloading rustup-init:  23%|██▎       | 4.47M/19.3M [00:00<00:00, 44.7MB/s]
      Downloading rustup-init:  62%|██████▏   | 11.9M/19.3M [00:00<00:00, 62.0MB/s]
      Downloading rustup-init: 100%|██████████| 19.3M/19.3M [00:00<00:00, 67.7MB/s]
      Installing rust to /root/.cache/puccinialin/rustup
      info: profile set to 'minimal'
      info: default host triple is aarch64-unknown-linux-gnu
      info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
      info: latest update on 2025-12-11, rust version 1.92.0 (ded5c06cf 2025-12-08)
      info: downloading component 'cargo'
      info: downloading component 'rust-std'
      info: downloading component 'rustc'
      info: installing component 'cargo'
      info: installing component 'rust-std'
      info: installing component 'rustc'
      info: default toolchain set to 'stable-aarch64-unknown-linux-gnu'
      Checking if cargo is installed
      cargo 1.92.0 (344c4567c 2025-10-21)
      Python reports SOABI: cpython-313-aarch64-linux-gnu
      Computed rustc target triple: aarch64-unknown-linux-gnu
      Installation directory: /root/.cache/puccinialin
      Rustup already downloaded
      Installing rust to /root/.cache/puccinialin/rustup
      warn: It looks like you have an existing rustup settings file at:
      warn: /root/.rustup/settings.toml
      warn: Rustup will install the default toolchain as specified in the settings file,
      warn: instead of the one inferred from the default host triple.
      info: profile set to 'minimal'
      info: default host triple is aarch64-unknown-linux-gnu
      warn: Updating existing toolchain, profile choice will be ignored
      info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
      info: default toolchain set to 'stable-aarch64-unknown-linux-gnu'
      Checking if cargo is installed
      cargo 1.92.0 (344c4567c 2025-10-21)
      error: failed to load source for dependency `kreuzberg-tesseract`

      Caused by:
        Unable to update /tmp/pip-install-5vl4j1lz/kreuzberg_f418ba72cd45413f9ab588d83e4c405a/crates/kreuzberg-tesseract

      Caused by:
        failed to read `/tmp/pip-install-5vl4j1lz/kreuzberg_f418ba72cd45413f9ab588d83e4c405a/crates/kreuzberg-tesseract/Cargo.toml`

      Caused by:
        No such file or directory (os error 2)
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-fjj2djjq', '--interpreter', '/usr/local/bin/python3.13']' returned non-zero exit status 1.
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-fjj2djjq --interpreter /usr/local/bin/python3.13`
      Rust not found, installing into a temporary directory
      [end of output]

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

× Encountered error while generating package metadata.
╰─> kreuzberg

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I also tried installing Rust first and adding .cargo/bin to the PATH and while it finds the Rust toolchain and skips that installation part, I still get the same issue:

root@4ed45fa46b44:/# pip install kreuzberg==4.0.0rc21
Collecting kreuzberg==4.0.0rc21
  Using cached kreuzberg-4.0.0rc21.tar.gz (837 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      error: failed to load source for dependency `kreuzberg-tesseract`

      Caused by:
        Unable to update /tmp/pip-install-2evj5q0k/kreuzberg_6eb6bdb6c8d447f29d451d7bbafc23c1/crates/kreuzberg-tesseract

      Caused by:
        failed to read `/tmp/pip-install-2evj5q0k/kreuzberg_6eb6bdb6c8d447f29d451d7bbafc23c1/crates/kreuzberg-tesseract/Cargo.toml`

      Caused by:
        No such file or directory (os error 2)
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-jxuexj17', '--interpreter', '/usr/local/bin/python3.13']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-jxuexj17 --interpreter /usr/local/bin/python3.13`
      [end of output]

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

× Encountered error while generating package metadata.
╰─> kreuzberg

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I can help running other tests if you need me to.

Steps to reproduce the issue:

  1. docker run -it docker.io/python:3.13.11-slim-bookworm /bin/bash
  2. pip install kreuzberg==4.0.0rc21

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions