Reputation: 543
I am trying to use MysqlOperator of Airflow
While importing
from airflow.providers.mysql.operators.mysql import MySqlOperator
I am getting the following error
No module named 'airflow.providers.mysql'
Upvotes: 3
Views: 7725
Reputation: 1847
This fixed it for me, it is also from the official airflow website:
You can install this package on top of an existing airflow 2.1+ installation via
pip install apache-airflow-providers-mysql
for Python 3 environment use bellow:
pip3 install apache-airflow-providers-mysql
Upvotes: 7