Thanks a lot Sumit & Max.

Finally I could resolve it by following the above  stack overflow link and
then doing `pip install airflow[mysql]`

Reagrds,
Madhu

On Mon, Jun 20, 2016 at 8:27 AM, Maxime Beauchemin <
[email protected]> wrote:

> `mysqlclient` is the [in place drop in, compatible with `MySQLdb`] library
> you want to use as it is maintained and py3 compatible.
>
> `pip install airflow[mysql]` will install mysqlclient with a version that
> has been tested with Airflow.
>
> Max
>
> On Mon, Jun 20, 2016 at 2:51 AM, Sumit Maheshwari <[email protected]>
> wrote:
>
> > mysql_hook uses MySQLdb. Just see if you are not hit by this issue:
> >
> >
> >
> http://stackoverflow.com/questions/6383310/python-mysqldb-library-not-loaded-libmysqlclient-18-dylib
> >
> >
> >
> > On Mon, Jun 20, 2016 at 5:58 AM, Msr Msr <[email protected]> wrote:
> >
> > > Hi,
> > >
> > > I have installed Airflow on Mac and trying to use  MySqlOperator.
> > >
> > > It is giving below error message.
> > >
> > > ------------------
> > >
> > > mms-MacBook-Pro:~ mm$ airflow initdb
> > >
> > > [2016-06-19 17:21:06,794] {__init__.py:36} INFO - Using executor
> > > SequentialExecutor
> > >
> > > DB: sqlite:////Users/mm/airflow/airflow.db
> > >
> > > [2016-06-19 17:21:07,345] {db.py:222} INFO - Creating tables
> > >
> > > INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
> > >
> > > INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
> > >
> > > ERROR [airflow.models.DagBag] Failed to import:
> > > /Users/mm/airflow/dags/S3test.py
> > >
> > > Traceback (most recent call last):
> > >
> > >   File
> > "/Users/mm/anaconda/lib/python2.7/site-packages/airflow/models.py",
> > > line 247, in process_file
> > >
> > >     m = imp.load_source(mod_name, filepath)
> > >
> > >   File "/Users/mm/airflow/dags/S3test.py", line 4, in <module>
> > >
> > >     from airflow.operators import MySqlOperator
> > >
> > > ImportError: cannot import name MySqlOperator
> > >
> > > -------------------
> > >
> > >
> > > pip install airflow[mysql] always gives Requirements met
> > >
> > >
> > > Could someone please suggest what could be the reason for this error
> and
> > > how to resolve it
> > >
> > >
> > > Thanks,
> > >
> > > msr
> > >
> >
>

Reply via email to