在/ tmp / pip_build_root / confluent-kafka中安装失败,错误代码为1

时间:2018-05-16 12:14:56

标签: python python-3.x ubuntu apache-kafka

当我尝试在kafka上使用sudo pip3 install confluent_kafka下载Ubuntu 14.04时,出现以下错误。我有librdkafka安装的sudo apt-get install librdkafka-dev python-dev的最新版本,这是必需的,因为它是在confluent-kafka-python github的先决条件中编写的。任何想法为什么它不起作用?

Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/confluent-kafka/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-no3e8l_m-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/confluent-kafka
Storing debug log for failure in /home/.pip/pip.log

1 个答案:

答案 0 :(得分:0)

我面临着同样的问题。我在安装python3-confluent-kafka之后尝试使用apt安装librdkafka

sudo apt install python3-confluent-kafka

如果您使用的是python 2,则可以运行:

sudo apt install python-confluent-kafka

然后再次尝试pip3 install confluent-kafka。修复了构建错误并成功安装。