Skip to content

Install crashes on ARM with Musl (e.g. RPi + Alpine) #1721

Open
@latekvo

Description

@latekvo

Installation of pydantic-core>=2.0.0 crashes on ARM platforms with Musl libc linux running as the kernel.
This is due to:

  1. Pydantic does not ship a py wheel of pydantic-core for cpython-312-arm-linux-musleabihf
  2. Rust supports arm-unknown-linux-musleabihf as a "Tier 2" architecture. Despite "Tier 2" architectures being theoritically supported, at the time of testing, no pre-compiled toolkits were available for this platform.

This issue can be fixed by adding a wheel for cpython-312-arm-linux-musleabihf.

This is kind of a big deal, as Raspberry Pi with Alpine is a pretty popular setup (it's extremely tiny and memory efficient), and pydantic is quite essential for most python projects.
Also, while I'm aware that most python packages do not ship their wheels with this kind of broad platform support, it would be nice to hold pydantic to a higher standard, since it's so widely used in other packages as well.

Exact pydantic-core versions tested:

  • pydantic_core==2.33.2: failing
  • pydantic_core==1.10.22: working well

Exact error message:

Collapsed error log
$ pip install -r requirements.txt
Collecting aiohappyeyeballs==2.4.6 (from -r requirements.txt (line 1))
  Using cached aiohappyeyeballs-2.4.6-py3-none-any.whl.metadata (5.9 kB)
Collecting aiohttp==3.11.12 (from -r requirements.txt (line 2))
  Using cached aiohttp-3.11.12.tar.gz (7.7 MB)
  Installing build dependencies ... done

[......]

  Preparing metadata (pyproject.toml) ... done
Collecting pydantic==2.10.6 (from -r requirements.txt (line 32))
  Using cached pydantic-2.10.6-py3-none-any.whl.metadata (30 kB)
Collecting pydantic_core==2.27.2 (from -r requirements.txt (line 33))
  Using cached pydantic_core-2.27.2.tar.gz (413 kB)
  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
  ╰─> [5 lines of output]
      Python reports SOABI: cpython-312-arm-linux-musleabihf
      Computed rustc target triple: arm-unknown-linux-musleabihf
      Target triple not supported by rustup: arm-unknown-linux-musleabihf
      Checking for Rust toolchain....
      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.

[notice] A new release of pip is available: 25.0.1 -> 25.1.1
[notice] To update, run: pip install --upgrade pip
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

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

Full requirements.txt file at the time of failure:

Collapsed file
aiohappyeyeballs==2.6.1
aiohttp==3.11.18
aiosignal==1.3.2
annotated-types==0.7.0
anyio==4.9.0
attrs==25.3.0
certifi==2025.4.26
charset-normalizer==3.4.2
dataclasses-json==0.6.7
frozenlist==1.6.0
greenlet==3.2.2
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
httpx-sse==0.4.0
idna==3.10
jsonpatch==1.33
jsonpointer==3.0.0
langchain==0.3.25
langchain-community==0.3.24
langchain-core==0.3.60
langchain-text-splitters==0.3.8
langsmith==0.3.42
marshmallow==3.26.1
multidict==6.4.4
mypy_extensions==1.1.0
numpy==2.2.6
orjson==3.10.18
packaging==24.2
propcache==0.3.1
pydantic==2.11.4
pydantic-settings==2.9.1
pydantic_core==2.33.2
python-dotenv==1.1.0
PyYAML==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
SQLAlchemy==2.0.41
tenacity==9.1.2
typing-inspect==0.9.0
typing-inspection==0.4.0
typing_extensions==4.13.2
urllib3==2.4.0
yarl==1.20.0
zstandard==0.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions