Installing mysqlclient for mariadb on mac os for python3
The problem is here since mariadb
10.2.x, with mariadb
10.1.23 I have no problem to install mysqlclient
.
So with mariadb
10.2.x we needs to install mariadb-connector-c
:
brew unlink mariadb
brew install mariadb-connector-c
ln -s /usr/local/opt/mariadb-connector-c/bin/mariadb_config /usr/local/bin/mysql_config
pip install mysqlclient
rm /usr/local/bin/mysql_config
brew unlink mariadb-connector-c
brew link mariadb
UPDATE: the bug is fixed in mysqlclient (see https://github.com/PyMySQL/mysqlclient-python/pull/177) but not yet released
SOLVE:
pip uninstall mysqlclient
pip install -U git+git://github.com/PyMySQL/mysqlclient-python