- Install librdkafka
brew install librdkafka
- One-line command installation, pay attention to the path of librdkafka (one-line command, can not be opened, otherwise it will be invalid)
C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/1.8.0/include LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/1.8. 0/lib pip install confluent_kafka