简体   繁体   English

pip install 命令出错,退出状态为 1

[英]pip install Command errored out with exit status 1

I have this requirments.txt file:我有这个requirments.txt文件:

confluent-kafka[avro]==1.1.0

When I run the command -当我运行命令时 -

$ pip3 install -r requirments.txt

This is the errors I received:这是我收到的错误:

ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-record-60zlo4l3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/confluent-kafka
         cwd: /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/
    Complete output (34 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.9
    creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka
    copying confluent_kafka/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka
    creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/admin
    copying confluent_kafka/admin/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/admin
    creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
    copying confluent_kafka/avro/error.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
    copying confluent_kafka/avro/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
    copying confluent_kafka/avro/cached_schema_registry_client.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
    copying confluent_kafka/avro/load.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
    creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
    copying confluent_kafka/kafkatest/verifiable_client.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
    copying confluent_kafka/kafkatest/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
    copying confluent_kafka/kafkatest/verifiable_consumer.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
    copying confluent_kafka/kafkatest/verifiable_producer.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
    creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro/serializer
    copying confluent_kafka/avro/serializer/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro/serializer
    copying confluent_kafka/avro/serializer/message_serializer.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro/serializer
    running build_ext
    building 'confluent_kafka.cimpl' extension
    creating build/temp.macosx-10.15-x86_64-3.9
    creating build/temp.macosx-10.15-x86_64-3.9/confluent_kafka
    creating build/temp.macosx-10.15-x86_64-3.9/confluent_kafka/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c confluent_kafka/src/Admin.c -o build/temp.macosx-10.15-x86_64-3.9/confluent_kafka/src/Admin.o
    In file included from confluent_kafka/src/Admin.c:17:
    confluent_kafka/src/confluent_kafka.h:22:10: fatal error: 'librdkafka/rdkafka.h' file not found
    #include <librdkafka/rdkafka.h>
             ^~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-record-60zlo4l3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/confluent-kafka Check the logs for full command output.

The python version used is -使用的python版本是 -

$ python3 --version

Python 3.9.5

What is the issue here and how to solve it?这里有什么问题以及如何解决?

You need the .h development headers.您需要.h开发标头。 sudo apt install librdkafka-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 pip 安装 jupyterlab 错误:命令出错,退出状态为 1: - pip install jupyterlab ERROR: Command errored out with exit status 1: Pip 安装 magpie 错误:Command Errored out with exit status 1 - Pip Install magpie error: Command Errored out with exit status 1 pip install darknetpy 不起作用,“错误:命令出错,退出状态为 1” - pip install darknetpy not working, “ERROR: Command errored out with exit status 1” Pip install qiskit:命令出错,退出状态为 255: - Pip install qiskit: Command errored out with exit status 255: Pip 安装错误与 pycontractions '错误:命令错误退出状态 1:' - Pip install error with pycontractions 'ERROR: Command errored out with exit status 1:' pip 安装生成错误:命令错误退出状态为 1 - pip install generates ERROR: Command errored out with exit status 1 如何使用 pip 安装修复“命令错误,退出状态为 1” - How to fix 'Command errored out with exit status 1' with pip install Windows 10:Pip 安装错误:命令出错,退出状态为 1 - Windows 10: Pip install error: Command errored out with exit status 1 Python pip install 以“退出状态为 1 的命令出错:...”结束 - Python pip install ends with "command errored out with exit status 1:..." Pip 安装出错,退出状态为 1 [已解决] - Pip install errored out with exit status 1 [SOLVED]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM