无法从源代码(pypi)进行pipenv安装confluent-kafka 1.4.0-似乎没有解决方法

问题描述 投票:0回答:1

似乎在pypi上用issue记录了一个current Confluent-Kafka package

我有一个包含以下代码的Dockerfile,该代码用于工作直到问题发生为止:

RUN cd /tmp && git clone https://github.com/edenhill/librdkafka.git \
&& cd librdkafka \
&& ./configure --prefix /usr \
&& make \
&& make install \
&& cd .. \
&& rm -rf librdkafka

RUN apk --update add \
......
pip3 install -U setuptools &&\
pip3 install --upgrade pip \
avro-python3\
confluent-kafka[avro]\
confluent-kafka\

ERROR after the issue: Command errored out with exit status 1:
 command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = 
 '"'"'/tmp/pip-req-build-14u6lptl/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-
 14u6lptl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)
 (__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, 
 __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-14u6lptl/pip-egg-info
     cwd: /tmp/pip-req-build-14u6lptl/
 Complete output (5 lines):
 Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-14u6lptl/setup.py", line 12, in <module>
    with open(os.path.join(mod_dir, 'requirements.txt')) as f:
 FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build- 
 14u6lptl/confluent_kafka/requirements.txt'

在该问题的github页面上,针对解决该问题提出了一些建议,我已经尝试过这样的建议:

1)解决方法未成功

ENV LIBRDKAFKA_VERSION v1.4.0 \
RUN cd /tmp && git clone https://github.com/edenhill/librdkafka.git \
  && cd librdkafka \
  && git checkout $LIBRDKAFKA_VERSION \
  && ./configure --install-deps --prefix /usr \
  && make \
  && make install 

RUN apk --update add \
......
pip3 install -U setuptools &&\
pip3 install --upgrade pip \
avro-python3\
confluent-kafka[avro]\
confluent-kafka\
....

2)解决方法未成功

ENV LIBRDKAFKA_VERSION v1.4.0 \
RUN cd /tmp && git clone https://github.com/edenhill/librdkafka.git \
  && cd librdkafka \
  && git checkout $LIBRDKAFKA_VERSION \
  && ./configure --install-deps --prefix /usr \
  && make \
  && make install

RUN apk --update add \
.....
pip3 install -U setuptools &&\
pip3 install --upgrade pip \
avro-python3\
confluent-kafka[avro]\
--no-binary :all: -i https://test.pypi.org/simple/ confluent-kafka==v1.4.0.1 \
....

ERROR: 
Service 'xxxx' failed to build: The command '/bin/sh -c apk --update add 
avro-python3    
confluent-kafka[avro]    
--no-binary :all: -i https://test.pypi.org/simple/ confluent-kafka==v1.4.0.1 
returned a non-zero code: 1

我想知道是否有没有解决的办法,我没有尝试过有人可以建议我解决这个问题,直到他们解决这个问题。

dockerfile pypi confluent-kafka librdkafka
1个回答
0
投票
只需将其固定到旧版本,直到他们发布新版本:
© www.soinside.com 2019 - 2024. All rights reserved.