SQLdb Python on Mac
Mac 10.9
Download the package from the internet
Sudo easy_install mysql-python
Decisive failure.
Download mysql-python-1.2.3.tar from the internet
In fact, there are 1.2.5 versions, but they are too new to use. it seems that there is no tar version currently, and only zip is available.
Decompress the package and use vim to open site. cfg.
There is a line # mysql_config =/usr/local/bin/mysql_config
Remove the preceding annotations and enter the actual installation directory based on the mysql installation directory on your computer. if you click next, it should be as follows.
Mysql_config =/usr/local/mysql/bin/mysql_config
Then install with GCC and execute
Python setup. py clean
Python setup. py build
Python setup. py install
However, the second error occurs.
The error is as follows:
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
Then I checked SOF and found the solution:
export CFLAGS=-Qunused-argumentsexport CPPFLAGS=-Qunused-arguments
Then I installed it. after a long time, I wrote it down here. I hope you can avoid detours.
After installing CJSON, you must add-E to sudo.