Illegal instruction when using duckdb in docker sandboxes

Open
#410 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
databases

Research direction

Reproduce the failure by following the linked Docker sandbox setup, then create the Python 3.12 virtual environment and install duckdb 1.5.1 as shown. Start at the import duckdb entry point and compare the reported stable package versions; done means identifying the compatibility cause and verifying that importing the package no longer raises Illegal instruction in the stated aarch64 microVM.

Written by the indexing model from the issue text.

Description

needs triage
What happens?

When trying to use the duckdb python client inside a docker sandbox, 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 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?
  • Yes, I have
Did you include all relevant configuration to reproduce the issue?
  • Yes, I have
Dominant language
Python
Stars
186
Forks
113
Avg merge
20h 58m
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duckdb/duckdb-python

All issues in duckdb/duckdb-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.