Apache Airflow : airflow initdb results in “ImportError: No module named json”

杀马特。学长 韩版系。学妹 提交于 2019-12-01 03:55:58

Just upgrade flask. You can use this command:

sudo pip install --upgrade Flask

The problem is known, and is described here, in the ASF Mail Archives

We removed the incompatible Werkzeug library from apache master this weekend. It caused Airflow installations to fail.

To resolve, manually install the werkzeug library in a correct version:

pip install werkzeug>=0.15.0

As explained in the mail list, this seems to be a temporary problem, and this solution is a workaround. The problem is encountered in version 1.10.3.

On Mac while installing apache-airflow, I got following error:

ERROR: apache-airflow 1.10.3 has requirement jinja2<=2.10.0,>=2.7.3, but you'll have jinja2 2.10.1 which is incompatible. ERROR: apache-airflow 1.10.3 has requirement werkzeug<0.15.0,>=0.14.1, but you'll have werkzeug 0.15.4 which is incompatible.

Re-installing werkzeug and jinja worked for me.

pip install jinja2>=2.10.0
pip install werkzeug>=0.15.0

sudo pip install --upgrade Flask worked for me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!