Reputation: 471
I am using Macbook with M series chip.
While running python which has confluent-kafka dependency, getting this error.
Installed dependencies using pip3. Also installed librdkafka
ImportError: dlopen(/Library/Python/3.8/site-packages/confluent_kafka/cimpl.cpython-38-darwin.so, 0x0002): tried: '/Library/Python/3.8/site-packages/confluent_kafka/cimpl.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))
Upvotes: 1
Views: 931
Reputation: 191711
Always check github issues.
https://github.com/confluentinc/confluent-kafka-python/issues/1190#issuecomment-1017410984
If you used homebrew to get librdkafka, you can install like so
C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/lib pip install confluent_kafka
Upvotes: 1