I have Conflicts with when installing pip install Mysql-python it seems that the error is the connector with mariadb and I use the following:
Virtualenv
Python 2.7
Homebrew - > contains mariabd
macOS Sierra - > version 10.12.6
and this is the error I get:
(example) 16:19:56 jugaz ~/FrontEnd/Work/example [master !] $
pip install mysql
Collecting mysql
Collecting MySQL-python (from mysql)
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Building wheels for collected packages: MySQL-python
Running setup.py bdist_wheel for MySQL-python ... error
Complete output from command /Users/jugaz/FrontEnd/Work/example/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-install-iXIPgT/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-wheel-pq64DS --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.12-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.12-x86_64-2.7
creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.12-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mariadb/10.2.15/include/mysql -I/usr/local/Cellar/mariadb/10.2.15/include/mysql/.. -I/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.12-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/local/Cellar/mariadb/10.2.15/include/mysql/my_config.h:3:2: warning: This file should not be included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
^
In file included from _mysql.c:46:
/usr/local/Cellar/mariadb/10.2.15/include/mysql/mysql.h:440:3: warning: this function declaration is not a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^
/usr/local/Cellar/mariadb/10.2.15/include/mysql/mysql.h:436:16: note: expanded from macro 'MYSQL_CLIENT_PLUGIN_HEADER'
int (*deinit)(); \
^
_mysql.c:1589:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (how < 0 || how >= sizeof(row_converters)) {
~~~ ^ ~
_mysql.c:2005:42: error: no member named 'reconnect' in 'struct st_mysql'
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
~~~~~~~~~~~~~~~~ ^
3 warnings and 1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for MySQL-python
Running setup.py clean for MySQL-python
Failed to build MySQL-python
Installing collected packages: MySQL-python, mysql
Running setup.py install for MySQL-python ... error
Complete output from command /Users/jugaz/FrontEnd/Work/example/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-install-iXIPgT/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-record-VLUPNd/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jugaz/FrontEnd/Work/example/bin/../include/site/python2.7/MySQL-python:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.12-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.12-x86_64-2.7
creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.12-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mariadb/10.2.15/include/mysql -I/usr/local/Cellar/mariadb/10.2.15/include/mysql/.. -I/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.12-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/local/Cellar/mariadb/10.2.15/include/mysql/my_config.h:3:2: warning: This file should not be included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
^
In file included from _mysql.c:46:
/usr/local/Cellar/mariadb/10.2.15/include/mysql/mysql.h:440:3: warning: this function declaration is not a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^
/usr/local/Cellar/mariadb/10.2.15/include/mysql/mysql.h:436:16: note: expanded from macro 'MYSQL_CLIENT_PLUGIN_HEADER'
int (*deinit)(); \
^
_mysql.c:1589:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (how < 0 || how >= sizeof(row_converters)) {
~~~ ^ ~
_mysql.c:2005:42: error: no member named 'reconnect' in 'struct st_mysql'
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
~~~~~~~~~~~~~~~~ ^
3 warnings and 1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/Users/jugaz/FrontEnd/Work/example/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-install-iXIPgT/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-record-VLUPNd/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jugaz/FrontEnd/Work/example/bin/../include/site/python2.7/MySQL-python" failed with error code 1 in /private/var/folders/kw/89nh94pd6td8bz3_dq9yjphr0000gp/T/pip-install-iXIPgT/MySQL-python/
I've tried several solutions that I've been seeing online, but nothing has worked for me. I've tried uninstalling homebrew, virtualevn and nothing.