0

Hi all I am tried to install the superset on OSX using the Python3. After the installation finished when I tried to add the Database using the mysql:// it said error No Module name MySQLDb. I tried to explore how to solved this, one of tutorial said try to install mysqlclient using pip3 install mysqlclient failed to install with error code mysql.h not found.

Than I following another tutorial used the mysql-connector. After I installed it, finally I can connect to mysql DB and insert table to the system. But when I tried to run the analysis from superset it said no data. Also I tried using SQL Lab and got the error args.

Updated: on my superset currently I am used the mysql+mysql-connector as URI Database connected properly, but when I tested to run a query it said execute() got an unexpected keyword argument 'args'. How to solve this?

Anyone have experience with this problem?

Thanks

Bireon
  • 179
  • 2
  • 4
  • 18
  • With which problem? You mentioned a list of issues, so I do not really know which one you are seeking an answer to. Also, your question lacks details, therefore any of these problems would be difficult to answer anyway. Not to mention the fact, that the answer to your question is: Yes, I do have experience with this problem or no, I do not have any experience with this problem. Neither of which will get you very far. Pls update your question to reflect what you want to know. – Shadow May 17 '18 at 12:27
  • I updated my questions, thanks for response – Bireon May 17 '18 at 12:33

2 Answers2

1

Here is what works for me:

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

Cheers!

radtek
  • 34,210
  • 11
  • 144
  • 111
0

Finally I got it working now. What I am doing is reinstall the superset, run the brew install mysql-connector-c than run pip install mysqlclient

Bireon
  • 179
  • 2
  • 4
  • 18