用Python 3在luigi中支持MySqlTarget?
尝试从luigi.contrib.mysqldb import MySqlTarget调用用Python 3在luigi中支持MySqlTarget?,python,mysql,luigi,Python,Mysql,Luigi,尝试从luigi.contrib.mysqldb import MySqlTarget调用时,我收到警告: I get the error: Loading MySQL module without the python package mysql-connector-python. This will crash at runtime if MySQL functionality is used. 我没有下载用于python安装的mysql,我也不能,因为pip insta
时,我收到警告:
I get the error: Loading MySQL module without the python package mysql-connector-python.
This will crash at runtime if MySQL functionality is used.
我没有下载用于python安装的mysql
,我也不能,因为pip install mysql
抛出了一个ConfigParser
相关错误。根据mysql
与python3不兼容,但是有一个叫做mysqlclient
的分叉版本。我有这个软件包,但是MySqlTarget
看起来像是为版本2编写的
这里推荐的方法是为pymysql
提供我自己的版本,还是已经有人在做这个了
目标是在本地创建一个表,然后在luigi.Task
中更新一个MySQL表。您是否尝试过安装MySQL connector python
?我也收到了同样的警告,在通过pip(pip3安装mysql连接器python
)安装后,它可以正常工作。@Bernard我没有试过,不,谢谢你的提示。在遇到这个限制之后,我实际上切换到了气流,并且没有回头看。您试过了吗?它与MySqlTarget一起工作,但是现在使用SQLAlchemyTarget来支持其他RDBMS。我快速查看了气流,但并没有真正使用它。