【发布时间】:2021-07-03 12:30:33
【问题描述】:
我目前在 ECS 上使用 Airflow 1.10.9。我在 requirements.txt 文件中明确指定 Airflow 版本,如下所示。
apache-airflow[aws,celery,crypto,gcp,jdbc,mysql,password,postgres,slack,statsd]==1.10.9
pandas_gbq.gbq 0.15.0 发布后,我们的 Airflow 集群在 Web UI 上出现了这个错误。
cannot import name '_check_google_client_version' from 'pandas_gbq.gbq'
这是因为 bigquery_hook import _check_google_client_version from pandas_gbq 但从 0.15.0 起已被删除。
https://github.com/apache/airflow/blob/1.10.9/airflow/contrib/hooks/bigquery_hook.py#L40
https://github.com/pydata/pandas-gbq/blob/0.14.1/pandas_gbq/gbq.py#L37 https://github.com/pydata/pandas-gbq/blob/0.15.0/pandas_gbq/gbq.py
我尝试通过如下指定 pandas-gbq 的版本来安装 pandas_gbq 0.14.1,但它不起作用。容器上安装了 pandas-gbq 0.15.0。
pandas==0.25.3
pandas-gbq==0.14.1
apache-airflow==1.10.9
你能帮我在我的 Airflow 容器上安装 pandas-gbq 0.14.1 吗?
【问题讨论】:
标签: python pandas google-bigquery airflow