mysql-python on mac os 10.9.1

女生的网名这么多〃 提交于 2019-11-28 01:57:02

问题


I can't seem to be able to install mysql-python on 10.9.1. I suspect it has something to do with latest command line tools update but I'm no expert:

Running MySQL-python-1.2.5/setup.py -q bdist_egg --dist-dir /var/folders/s7/j138zlt172nf6qqpn98rhzhm0000gn/T/easy_install-kq86vo/MySQL-python-1.2.5/egg-dist-tmp-edndmM
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: Setup script exited with error: command 'cc' failed with exit status 1

Any idea how to overcome this?

Same error with pip as well.


回答1:


I just like to improve your answer, which helped me, too:

On MacShell do the following:

sudo su
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install MySQL-python

Otherwise these Options won't be used.

Cheers!




回答2:


Fixed it by running:

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

before `pip install...```



来源:https://stackoverflow.com/questions/22392156/mysql-python-on-mac-os-10-9-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!