我有一个dockerfile
FROM python:3.9.6-alpine3.14
ARG AIRFLOW_USER_HOME=/usr/local/airflow
ENV AIRFLOW_HOME=${AIRFLOW_USER_HOME}
RUN pip install apache-airflow[postgres,ssh,s3]==2.0.0 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.0/constraints-3.9.txt
#Add aws config profiles from local to docker machine
ADD ./environtment_config/airflow_config/entrypoint.sh /entrypoint.sh
ADD ./environtment_config/airflow_config/airflow.cfg ${AIRFLOW_USER_HOME}/airflow.cfg
RUN chown -R 777 ${AIRFLOW_USER_HOME}
RUN chmod -R 777 /entrypoint.sh
EXPOSE 8080 8081 5432 5555 8793
WORKDIR "/"
ENTRYPOINT ["/entrypoint.sh"]
#arg to entrypoint
CMD ["webserver"]我得到的错误是:
ERROR: Cannot install apache-airflow[postgres,s3,ssh]==2.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
apache-airflow[postgres,s3,ssh] 2.0.0 depends on pandas<2.0 and >=0.17.1
The user requested (constraint) pandas==1.2.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict我不明白问题是什么,因为--constraint文件中的熊猫版本是pandas==1.2.2。因此,它完全满足了apache气流所需的依赖。
若要丢弃与我还测试过的额外包有关的问题,请使用以下方法:
RUN pip install apache-airflow==2.0.0 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.0/constraints-3.9.txt我也会犯同样的错误。
发布于 2021-08-15 13:39:36
参见气流2.0.0:https://airflow.apache.org/docs/apache-airflow/2.0.0/installation.html的安装文档-您需要使用PIP20.2.4来安装气流2.0.0:
在2020年11月,新版本的PIP (20.3)已经发布了一个新的,2020年解析器。这个解析器还不能与Apache气流一起工作,并且可能导致安装中的错误--取决于您对附加程序的选择。为了安装气流,您需要将pip降级到20.2.4版本- pip升级- Pip =20.2.4,或者,如果您使用pip 20.3,则需要在pip安装命令中添加选项-- use -deprecated遗留解析器。
与较新的PIP版本的兼容性在2.1.*系列中得到了修正。
只是个问题。为什么要安装2.0.0版本?有什么特别的原因吗?您缺少了许多bug--包括一些关键的安全修复--例如,在2.1.2中应用了这个关键的安全修复:
气流实现SemVer --这意味着所有2.*版本都是向后兼容的。即使在2.0.*系列中,也有2.0.1和2.0.2 bugifxes,我们即将发布2.1.3。这为2.1提供了另一轮修复。我想不出你为什么要安装气流2.0.0。你能解释一下你为什么需要那个吗?
https://stackoverflow.com/questions/68791073
复制相似问题