gpt4 book ai didi

airflow - Apache Airflow : airflow initdb throws ModuleNotFoundError: No module named 'werkzeug.wrappers.json' ; 'werkzeug.wrappers' is not a package error

转载 作者:行者123 更新时间:2023-12-02 05:41:32 29 4
gpt4 key购买 nike

在带有 python 3.6.8 的 Ubuntu 18.04 上,尝试安装 Airflow。当我运行airflow initdb命令时,抛出以下错误

Traceback (most recent call last):
File "/home/uEnAFpip/.virtualenvs/airflow/bin/airflow", line 21, in <module>
from airflow import configuration
File "/home/uEnAFpip/.virtualenvs/airflow/lib/python3.6/site-packages/airflow/__init__.py", line 40, in <module>
from flask_admin import BaseView
File "/home/uEnAFpip/.virtualenvs/airflow/lib/python3.6/site-packages/flask_admin/__init__.py", line 6, in <module>
from .base import expose, expose_plugview, Admin, BaseView, AdminIndexView # noqa: F401
File "/home/uEnAFpip/.virtualenvs/airflow/lib/python3.6/site-packages/flask_admin/base.py", line 6, in <module>
from flask import Blueprint, current_app, render_template, abort, g, url_for
File "/home/uEnAFpip/.virtualenvs/airflow/lib/python3.6/site-packages/flask/__init__.py", line 20, in <module>
from .app import Flask
File "/home/uEnAFpip/.virtualenvs/airflow/lib/python3.6/site-packages/flask/app.py", line 69, in <module>
from .wrappers import Request
File "/home/uEnAFpip/.virtualenvs/airflow/lib/python3.6/site-packages/flask/wrappers.py", line 14, in <module>
from werkzeug.wrappers.json import JSONMixin as _JSONMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.json'; 'werkzeug.wrappers' is not a package

尝试过 pip3 install --upgrade Flask

最佳答案

“pip3 install werkzeug==0.15.4”解决了我的问题。看来 Flask 引用了错误版本的 werkzeug。

关于airflow - Apache Airflow : airflow initdb throws ModuleNotFoundError: No module named 'werkzeug.wrappers.json' ; 'werkzeug.wrappers' is not a package error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56933523/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com