Voska
Voska

Reputation: 331

Unable to install MySQL-Python Mac Mavericks

I am unable to install MySQL-Python on Mavericks with sudo pip install MySQL-Python

I did export CPPFLAGS=-Qunused-arguments and export CFLAGS=-Qunused-arguments before running the command, but I still ran into this same error.

copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.macosx-10.9-intel-2.7

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mysql/5.6.15/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-intel-2.7/_mysql.o -Os -g -fno-strict-aliasing

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/mysql-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_UV3aF-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/mysql-python

Upvotes: 2

Views: 761

Answers (2)

Aerodyno
Aerodyno

Reputation: 469

Ok, here's what I did: sudo CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments python setup.py build then same thing, but 'install' instead of build

Upvotes: 0

Drewness
Drewness

Reputation: 5072

Run the following before pip install...

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

Upvotes: 1

Related Questions