Why can't easy_install find MySQLdb?
第一次安裝:
easy_install MySQLdb
失敗找不到包名,原因是名稱錯誤
正確的是:
pip install MySQL-python
然後編譯報錯:
Command "/usr/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-VQ6tqp/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ZRqghi-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-VQ6tqp/MySQL-python
原因是mysql-devel開發包沒有安裝
yum install mysql-devel