mysql-python安裝問題
遇到一特棘手的問題:
pip install mysql-python在我的mac上使不了。
問題:
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bUO2TQ/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-6gKXm5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bUO2TQ/mysql-python/
解決方法見:
http://stackoverflow.com/questions/19769648/cant-install-discount-with-pip-error-command-cc-failed-with-exit-status-1
但是該剛方法還是沒解決問題,忍了忍,直接裝了xcode,然後用
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install mysql-python
DONE!