Mac osx上的Apache超集

时间:2018-05-17 11:10:23

标签: mysql python-3.x mysql-connector apache-superset

大家好我尝试使用Python3在OSX上安装超集。安装完成后我尝试使用mysql添加数据库时://表示错误没有模块名称MySQLDb。我试图探索如何解决这个问题,其中一个教程说使用pip3 install mysqlclient尝试安装mysqlclient无法安装错误代码mysql.h未找到。

比我跟随另一个教程使用了mysql-connector。安装完毕后,最后我可以连接到mysql DB并将表插入系统。但是,当我试图从超集运行分析时,它说没有数据。我也尝试使用SQL Lab并得到错误args。

更新:在我的超集上,目前我使用mysql + mysql-connector作为URI数据库正确连接,但当我测试运行查询时,它说execute() got an unexpected keyword argument 'args'。怎么解决这个问题?

任何人都有这个问题的经验吗?

由于

2 个答案:

答案 0 :(得分:0)

最后我现在开始工作了。 我正在做的是重新安装超集,运行brew install mysql-connector-c而不是运行pip install mysqlclient

答案 1 :(得分:0)

这对我有用:

brew install python || true
brew install mysql || true

# Required for mysqlclient, see brew info openssl
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"

# And now it works
pip3 install mysqlclient

干杯!

相关问题