1. 程式人生 > >安裝mysql-python時報錯

安裝mysql-python時報錯

pip install mysql-python時報:

Command "/usr/home/root/python2.7.14/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yabeSc/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-fT9aIj-record/install-record.txt --single-version-externally-managed --compile
" failed with error code 1 in /tmp/pip-build-yabeSc/mysql-python/

原因:

未安裝mysql-devel開發包

yum install mysql-devel