Search code examples
dependenciesairflowdependency-managementpipenv

Airflow 1.10.10 installation with Pipenv


Has anyone had trouble installing apache-airflow 1.10.10 with pipenv? When I try to install it using a pipenv install I had the following error:

There are incompatible versions in the resolved dependencies:
  marshmallow<3.0.0,>=2.18.0 (from flask-appbuilder==2.3.4->apache-airflow==1.10.10->-r /var/folders/rl/p0x650cn1lx6f7syttzvh2hh0000gn/T/pipenvykrgd_0krequirements/pipenv-lwhwxrq7-constraints.txt (line 2))
  marshmallow>=2.0.0 (from marshmallow-enum==1.5.1->flask-appbuilder==2.3.4->apache-airflow==1.10.10->-r /var/folders/rl/p0x650cn1lx6f7syttzvh2hh0000gn/T/pipenvykrgd_0krequirements/pipenv-lwhwxrq7-constraints.txt (line 2))
  marshmallow>=3.0.0 (from marshmallow-sqlalchemy==0.24.0->flask-appbuilder==2.3.4->apache-airflow==1.10.10->-r /var/folders/rl/p0x650cn1lx6f7syttzvh2hh0000gn/T/pipenvykrgd_0krequirements/pipenv-lwhwxrq7-constraints.txt (line 2))

From what I understand, the sub-dependencies of Airflow requires marshmallow package with conflicting version: marshmallow<3.0.0 and marshmallow>=3.0.0. What I don’t understand is that it used to work. Is that normal that Airflow dependencies conflicts with itself? I don’t have the issue when doing a pip install apache-airflow==1.10.10 on a virtualenv without Pipenv.

Any insights? Thanks


Solution

  • I had the same issue installing apache-airflow 1.10.11 through pipenv. The conflicting dependency appears to be with flask-appbuilder's subdependencies. Pinning marshmallow-sqlalchemy = "==0.16.1" solved the problem for me.

    Pipfile:

    ...
    [packages]
    marshmallow-sqlalchemy = "==0.16.1"
    apache-airflow = "==1.10.11"
    ...
    

    I also successfully tested it with apache-airflow 1.10.10 & 1.10.12.