應該是Mac 10.9
然后裝的時候,從網上下載
sudo easy_install mysql-python
果斷失敗了。
接著從網上下載了MySQL-python-1.2.3.tar
其實有1.2.5的版本,但是太新了,不敢用,好像目前也沒tar的版本,只有zip的。
解壓后,用vim打開site.cfg
有一行#mysql_config = mysql_config = /usr/local/bin/mysql_config
把前面的注釋去掉,根據自己電腦mysql實際安裝目錄填寫,如果你一路next的話,應該是下面這樣的。
mysql_config = /usr/local/mysql/bin/mysql_config
然后用GCC安裝,執行
python setup.py clean
python setup.py build
python setup.py install
但是第二條就出錯了。
錯誤如下:
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
然后果斷查了下SOF,找到了解決的方法:
export CFLAGS=-Qunused-argumentsexport CPPFLAGS=-Qunused-arguments
安裝CJSON遇到了類似的問題,最后還需要 sudo 后面加-E才行。
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com