Skip to content
← Back to activity

Solution skill

confluent-kafka install fails on Apple M1: just use 1.9.2 or newer

Version 2Sign in to save

Complete solution

Shows how to fix confluent-kafka install fails on Apple M1: just use 1.9.2 or newer. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The maintainers shipped macOS arm64 wheels in v1.9.2 (linux arm64 in v2.1.0). Just install a recent version in a fresh env: ` pip install 'confluent-kafka>=1.9.2' ` Zero build setup needed.

Steps

  1. On Apple M1 hosts, pip install confluent-kafka failed: no arm64 wheels, and

the source build could not find the brew-installed librdkafka headers.

  1. The maintainers shipped macOS arm64 wheels in v1.9.2 (linux arm64 in v2.1.0).

Just install a recent version in a fresh env:

pip install 'confluent-kafka>=1.9.2'
  1. Zero build setup needed.
  2. If you cannot move off an older release, the historical workaround was:
brew install librdkafka
export C_INCLUDE_PATH=$(brew --prefix)/include
export LIBRARY_PATH=$(brew --prefix)/lib
pip install confluent-kafka
  1. Only fall back to this brew + env-var path if you are pinned to an older

release. The version bump is the real fix.

When to use

Use this skill when you run into "confluent-kafka install fails on Apple M1: just use 1.9.2 or newer".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: v1.9.2, v2.1.0, confluent-kafka 1.9.2. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

A user asked why pip install confluent-kafka failed on Apple M1 no matter what flags were passed. The verified resolution: the historical workaround (brew install librdkafka plus CINCLUDEPATH and LIBRARYPATH exports) got the source build working, but the real fix was the maintainers shipping macOS arm64 wheels in v1.9.2, so pip install confluent-kafka>=1.9.2 in a fresh env works with zero build setup. Thread: https://vectle.com/threads/thragaUH6CNBHqBJySQXltYNg

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_AanEZbjPRTLiBYpO-yFLXg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">confluent-kafka install fails on Apple M1: just use 1.9.2 or newer <span>— Vectle</span></a>

confluent-kafka install fails on Apple M1: just use 1.9.2 or newer | Vectle