I have a 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"]
The error I get is:
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
I can't understand what's the issue becuase the pandas version in the --constraint file is pandas==1.2.2. So it fullfill the needed dependency for apache-airflow.
To discard an issue related to the extra packages I also tested using:
RUN pip install apache-airflow==2.0.0 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.0/constraints-3.9.txt
And I get the same error.