Py学习  »  Django

mac 安装python-mysqldb出现的异常

talktoto • 11 年前 • 5785 次点击  

如下所述,我想知道这个问题应该如何处理。

MKdeMacBook-Air:~ tototalk $ sudo easy_install mysql-python

Searching for mysql-python Reading http://pypi.python.org/simple/mysql-python/ Best match: MySQL-python 1.2.5 Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip#md5=654f75b302db6ed8dc5a898c625e030c Processing MySQL-python-1.2.5.zip Running MySQL-python-1.2.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-lKNJv0/MySQL-python-1.2.5/egg-dist-tmp-5gF3FP 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

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/468
 
5785 次点击  
文章 [ 3 ]  |  最新文章 10 年前
WyattWang
Reply   •   1 楼
WyattWang    10 年前

@talktoto

我自己以前在安装的时候,也觉实遇到过这个问题,记得好像是改了源码某个参数的,但由于没有记录下来,所以现在也不知道怎么改法了。但我搜索最后一行错误的时候,有这样一个参考,你可以看看:

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

另外,如果只是本机开发的话,我觉得使用sqlite3是个不错的主意,我自己也安装有mysql,但这货一直运行着,且占用内存也不低。

jingzuo
Reply   •   2 楼
jingzuo    10 年前

没出过这个错误,试一下 pip install MySQL-python

Py站长
Reply   •   3 楼
Py站长    11 年前

没有mac 求Mac达人解决一下喽