python下载之后无法启动_全新安装后无法运行apache气流,python导入错误

1586010002-jmsa.png

after a fresh install using pip install apache-airflow, any attempts to run airflow end with a python import error:

Traceback (most recent call last):

File "/Users/\*/env/bin/airflow", line 26, in from airflow.bin.cli import CLIFactory

File "/Users/\*/env/lib/python3.7/site-packages/airflow/bin/cli.py", line 70, in from airflow.www.app import (cached_app, create_app)

File "/Users/\*/env/lib/python3.7/site-packages/airflow/www/app.py", line 26, in from flask_wtf.csrf import CSRFProtect

File "/Users/\*/env/lib/python3.7/site-packages/flask_wtf/__init__.py", line 17, in from .recaptcha import \*

File "/Users/\*/env/lib/python3.7/site-packages/flask_wtf/recaptcha/__init__.py", line 2, in from .fields import \*

File "/Users/\*/env/lib/python3.7/site-packages/flask_wtf/recaptcha/fields.py", line 3, in from . import widgets

File "/Users/\*/env/lib/python3.7/site-packages/flask_wtf/recaptcha/widgets.py", line 5, in from werkzeug import url_encode

ImportError: cannot import name 'url_encode' from 'werkzeug' (/Users/*/env/lib/python3.7/site-packages/werkzeug/__init__.py)

解决方案

It seemed to be a versioning error, the newer versions of the werkzeug package no longer have the url_encode that airflow is looking for, installing a lower version (pip install werkzeug==0.16.0) resolved the issue and airflow now runs without failing.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值