Installing mysqlclient for mariadb on mac os for python3

Viewed 10341

I have an issue with processing for the pip install mysqlclient for Python3 on MAC OS Sierra.

running build_ext
building '_mysql' extension
creating build/temp.macosx-10.12-x86_64-3.6
clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/openssl/1.0.2k/include -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 -I/usr/local/Cellar/mariadb/10.2.6/include/mysql -I/usr/local/Cellar/mariadb/10.2.6/include/mysql/.. -I/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c _mysql.c -o build/temp.macosx-10.12-x86_64-3.6/_mysql.o
_mysql.c:1911:42: error: no member named 'reconnect' in 'struct st_mysql'
        if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                               ~~~~~~~~~~~~~~~~ ^
1 error generated.
error: command 'clang' failed with exit status 1

I have installed MariaDB and xcode-select --install and also processed.

2 Answers

SOLVE:

pip uninstall mysqlclient
pip install -U git+git://github.com/PyMySQL/mysqlclient-python
Related