在安装libbz2 dev之后,如何删除python并将python安装回docker?

lztngnrs  于 2021-06-08  发布在  Redis
关注(0)|答案(0)|浏览(239)

我正在设置一个redis服务器作为docker容器。我尝试安装一些python模块供redisgears稍后使用。对于某些模块(pandas,tsfresh),我得到一个错误(没有名为“\u bz2”的模块)。因此,我将libbz2 dev安装到映像中,并希望根据importerror重新编译python:没有名为“\u bz2”的模块。
如何删除python并重新安装python?基本映像包括debian10(buster)和python3.7。
这是我目前的档案:

ARG OSNICK=buster
FROM redisfab/redisedgevision-${OSNICK}:0.2.0

ENV DEPS "python python3-pip python3-setuptools python3-dev gcc \
libglib2.0-0 libc6 libbz2-dev libssl-dev libsm6 libxrender1 libxext6 libgomp1 \
build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libsqlite3-dev \
libreadline-dev libffi-dev curl"

RUN set -ex; \
    apt-get update; \
    apt-get install -y --no-install-recommends $DEPS;

RUN set -ex\
    && cd /opt/redislabs/lib/modules/python3\
    && ./configure\
    && make\
    && make install

RUN set -ex; \
    pip3 install -U pipenv;

ADD ./requirements.txt /tmp/requirements.txt
RUN set -ex; \
    cd /opt/redislabs/lib/modules/python3; \
    pipenv run pip3 install -r /tmp/requirements.txt;

ADD redisedge.conf /usr/local/etc/redisedge.conf

EXPOSE 6379
ENTRYPOINT ["redis-server"]
CMD ["/usr/local/etc/redisedge.conf"]

$deps现在有点乱了,libbz2dev是我真正关心的包。
错误消息:

/bin/sh: 1: ./configure: not found
ERROR: Service 'redis' failed to build: The command '/bin/sh -c set -ex    && cd /opt/redislabs/lib/modules/python3    && ./configure    && make    && make install' returned a non-zero code: 127

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题