安装confluent-kafka

confluent-kafka-python   网上的资料很少 https://github.com/confluentinc/confluent-kafka-python

首先安装librdkafka  https://github.com/edenhill/librdkafka

git clone https://github.com/edenhill/librdkafka.git
cd librdkafka/
./configure
make
sudo make install

以上是GitHub上内容,但还要加一句

sudo ldconfig

不然会报

ImportError: librdkafka.so.1: cannot open shared object file: No such file or directory

FROM:https://github.com/confluentinc/confluent-kafka-python/issues/65

然后直接

sudo pip3 install confluent_kafka

你可能感兴趣的:(编程日记)