I am trying to use MySQL in Apache Airflow. I already use PymySQL to query MySQL databases and did not have MySQLDb installed. Thus I got the error:
from airflow.hooks.mysql_hook import MySqlHook
File "/anaconda3/anaconda/lib/python3.6/site-packages/airflow/hooks/mysql_hook.py", line 15, in <module>
import MySQLdb
ModuleNotFoundError: No module named 'MySQLdb'
If I go into mysql_hook.py class I already see they are using MySQLDB
import MySQLdb
import MySQLdb.cursors
What alternative I have other than importing pymysql manually instead of in a hook?
I am using Python 3.6
Thanks