首页 文章

apache-airflow安装失败

提问于
浏览
0

我正在尝试使用 pip install apache-airflow 建议的方式安装apache-airflow . 在摆锤安装(依赖)期间,我收到一个错误:

error: can't copy 'pendulum/parsing': doesn't exist or not a regular file

我认为它与Python distutils error: "[directory]... doesn't exist or not a regular file"有关,但是这并没有给出一个如何在使用pip时解决这个问题的答案 . 拉伸摆锤并使用 python setup.py install 进行安装,但随后当我再次执行 pip install apache-airflow 时,它看到已经安装了摆锤,UNINSTALLS,然后尝试使用pip再次安装,导致相同的错误 . 我'm using a docker container and installing python-setuptools with apt-get before I do any of this. Here'是我的dockerfile,fwiw ...

FROM phusion/baseimage:0.10.1
MAINTAINER a curious dev 

RUN apt-get update && apt-get install -y python-setuptools python-pip python-dev libffi-dev libssl-dev zip wget

ENV SLUGIFY_USES_TEXT_UNIDECODE=yes

RUN wget https://files.pythonhosted.org/packages/5b/57/71fc910edcd937b72aa0ef51c8f5734fbd8c011fa1480fce881433847ec8/pendulum-2.0.4.tar.gz
RUN tar -xzvf pendulum-2.0.4.tar.gz

RUN cd pendulum-2.0.4/ && python setup.py install

RUN pip install apache-airflow

CMD airflow initdb && airflow webserver -p 8080

有没有人看到我做错了什么?我没有发现任何其他人有这个错误,所以我认为有一些非常明显我错过了 . 谢谢阅读 .

1 回答

  • 1

    首先升级 pip .

    FROM phusion/baseimage:0.10.1
    RUN apt-get update && apt-get install -y python-setuptools python-pip python-dev libffi-dev libssl-dev zip wget
    ENV SLUGIFY_USES_TEXT_UNIDECODE=yes
    RUN pip install -U pip
    RUN pip install apache-airflow
    CMD airflow initdb && airflow webserver -p 8080
    

    似乎对我来说很好 .

相关问题