Skip to content

Installer selects incompatible "linux_aarch64" wheel on Android (Termux) #4

@speedyk-005

Description

@speedyk-005

Firstly , thnks for such work

The install script currently detects architecture ("aarch64") and selects a "linux_aarch64" wheel, but this is incompatible with Android environments (e.g. Termux), which use bionic libc instead of glibc.

As a result, the installation fails even though Python version and architecture match.


Steps to Reproduce

  1. Run:
  curl -sL https://raw.githubusercontent.com/Eutalix/android-pydantic-core/main/install_pydantic_core.sh | bash

or

pip install pydantic_core-*.whl
  1. Environment:

    • Android (Termux)
    • Python 3.13 (cp313)
    • Architecture: aarch64

Observed Behavior

The script selects:

pydantic_core-2.45.0-cp313-cp313-linux_aarch64.whl

Installation fails with:

[/s/e/0] ➤ curl -sL https://raw.githubusercontent.com/Eutalix/android-pydantic-core/main/install_pydantic_core.sh | bash
>>> Android Pydantic-Core Installer <<<
[1/4] Checking Python environment...
   - Python: 3.13 (cp313)
[2/4] Detecting architecture...
   - Arch: aarch64 -> Wheels matching: linux_aarch64
[3/4] Finding latest compatible wheel...
   - Querying GitHub API...
   - Found: pydantic_core-2.45.0-cp313-cp313-linux_aarch64.whl
[4/4] Downloading and installing...
   - Downloading...
#=#=#                                             ##O#-#                                            ##O=#  #                                          #=#=-#  #                                         -#O#- #   #                                       ##                                                #######                                           #########                                         ############                                      ###############                                   ###########
...
######### 100.0%

Installing wheel...
ERROR: pydantic_core-2.45.0-cp313-cp313-linux_aarch64.whl is not a supported wheel on this platform.
❌ Pip install filed. 

Expected Behavior

  • The installer should:
    • Detect Android (bionic libc) vs standard Linux (glibc)
    • Either:
      • Provide a compatible Android wheel, OR
      • Fall back to building from source, OR
      • Abort early with a clear message

Root Cause

The script assumes:

  • "aarch64" + "linux" = compatible wheel

But:

  • Android uses bionic libc, not glibc
  • Wheels tagged "linux_aarch64" are not compatible with Android

Suggested Fixes

  • Improve platform detection:

    • Detect Android via:
      uname -o
      or checking for "android"/"termux" in environment
  • Adjust wheel selection logic:

    • Avoid selecting "linux_*" wheels on Android
    • Provide Android-specific builds if available
  • Add fallback:

    • Attempt source build if no compatible wheel is found
  • Improve error messaging:

    • Explain ABI mismatch instead of letting pip fail cryptically

Additional Notes

This issue is more visible on Python 3.13, where compatible wheels are already limited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions