duckdb / duckdb/duckdb-python

Illegal instruction when using duckdb in docker sandboxes

Open
#410 0 comments 0 reactions 0 assignees View on GitHub
needs triage
Dominant language
Python
Stars
187
Forks
112
Avg merge
13h 29m
Merged PRs (30d)
17

Description

### What happens?

When trying to use the `duckdb` python client inside a [docker sandbox](https://docs.docker.com/ai/sandboxes/), I'm encountering an `Illegal instruction` error:

```
>>> import duckdb
Illegal instruction
```

As I understand, the docker sandbox is basically a microVM. The host OS is macOS.

### To Reproduce

Follow [docker sandbox instructions](https://docs.docker.com/ai/sandboxes/get-started/) to create a sandbox, and open a shell inside it:

```
docker sandbox exec -it codex-jzn bash
```

(`codex-jzn` is simply the sandbox name)

Inside the sandbox, create a virtual env and install duckdb:

```
agent@codex-jzn:~$ uv venv && source .venv/bin/activate
Using CPython 3.12.12
(agent) agent@codex-jzn:~$ uv pip install duckdb
Resolved 1 package in 486ms
Prepared 1 package in 527ms
Installed 1 package in 227ms
+ duckdb==1.5.1
```

Then, trying to import `duckdb` will fail:

```
(agent) agent@codex-jzn:~$ python
Python 3.12.12 (main, Jan 14 2026, 19:35:10) [Clang 21.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import duckdb
Illegal instruction
```

Note: I also tried different versions of `duckdb`, same issue.

### OS:

microVM: 6.12.67-linuxkit, aarch64 / host OS: macOS Version 26.3.1, arm64

### DuckDB Package Version:

1.5.1

### Python Version:

3.12

### Full Name:

Alexandre Thomas

### Affiliation:

/

### What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

### Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set

### Did you include all code required to reproduce the issue?

- [x] Yes, I have

### Did you include all relevant configuration to reproduce the issue?

- [x] Yes, I have

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.