> ## Content Index
> Fetch the complete content index at: https://insights.cloudacio.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Native wheels do not travel
- URL: https://insights.cloudacio.com/native-wheels-do-not-travel/
- Published: 2026-07-14T13:00:00.000Z
- Updated: 2026-08-12T19:18:34.000Z
- Description: Wheels with native extensions are compiled for a specific operating system and processor architecture. Install them on the machine you are sitting at, ship them to a Linux runtime, and the failure…
- Author: Juan Pablo Olivera
- Tags: Engineering

Wheels with native extensions are compiled for a specific operating system and processor architecture. Install them on the machine you are sitting at, ship them to a Linux runtime, and the failure arrives at cold start rather than at build time.

## The symptom

```
Runtime.ImportModuleError: Unable to import module 'handler':
No module named 'pydantic_core._pydantic_core'

```

The module is right there in the bundle. What is missing is a build of it for the architecture the code is running on. A macOS wheel ships a Mach-O object; an arm64 Linux runtime needs an ELF one.

## The fix

Pin the target explicitly rather than letting pip resolve for the host:

```bash
pip install -r requirements.txt -t build \
  --platform manylinux2014_aarch64 \
  --implementation cp --python-version 3.12 \
  --only-binary=:all:

```

`--only-binary=:all:` matters as much as the platform flag. Without it pip will happily fall back to building from source, on your machine, for your machine.

## Check it in CI

You cannot import the bundle to test it, because the runner is a different architecture. You can read the binaries:

```python
head = so.read_bytes()[:20]
assert head[:4] == b"\\x7fELF", f"{so}: not an ELF object"
assert struct.unpack_from("<H", head, 18)[0] == 0xB7, f"{so}: not AArch64"

```

Fast, exact, and it fails in the build rather than in front of a user.