Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 455
mich Avatar asked Oct 29 '20 14:10

mich


People also ask

How do I install Airflow in terminal?

In order to install Airflow you need to either downgrade pip to version 20.2. 4 pip upgrade --pip==20.2. 4 or, in case you use Pip 20.3, you need to add option --use-deprecated legacy-resolver to your pip install command. You also need database client packages (Postgres or MySQL) if you want to use those databases.


Video Answer


1 Answers

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.

like image 96
nnielsen Avatar answered Oct 24 '22 06:10

nnielsen