1

我试图在 MWAA 中安装 apache-airflow-providers-google,但似乎 Airflow 没有选择库:

    Broken DAG: [/usr/local/airflow/dags/mi-framework/jobs/google_analytics/main.py] Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/airflow/dags/mi-framework/jobs/google_analytics/main.py", line 8, in <module>
    from airflow.providers.google import *
ModuleNotFoundError: No module named 'airflow.providers.google'

我有以下 requirements.txt 文件:

apache-airflow[postgres]==2.0.2
apache-airflow[mysql]==2.0.2
apache-airflow-providers-google==6.0.0
sqlalchemy==1.3.24
google-api-python-client==2.27.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.6
sentry-sdk

我做错了什么?

4

1 回答 1

1

我假设您的 MWAA 气流版本是 2.0。*

因此,基于气流文档中的以下链接:https://airflow.apache.org/docs/apache-airflow-providers-google/stable/index.html您需要将 apache-airflow-providers-google 降级到 3.0 .0

气流文档中的图像

于 2022-01-24T15:38:22.510 回答