Im想要导入Google提供商。所以我安装了它
pip3 install apache-airflow-backport-providers-google
我可以看到所有的钩子和包目录下的一切
/usr/local/lib/python3.7/dist-packages/airflow/providers/google/cloud/transfer
但是当我运行import命令时,它失败了
from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator
Error:
Traceback (most recent call last):
File "test1.py", line 8, in <module>
from custom.custom_PostgresToGCSOperator import custom_PostgresToGCSOperator
File "/root/airflow/dags/custom/custom_PostgresToGCSOperator.py", line 8, in <module>
from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator
ModuleNotFoundError: No module named 'airflow.providers'
升级到2.0.0a1时,我遇到了同样的问题,我所做的是:
也请参阅此https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-8+Split+Providers+into+Separate+Packages+for+Airflow+2.0
相关问题 更多 >
编程相关推荐