Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-xdbcm9ow/mysqlclient/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-yrsi29qp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-xdbcm9ow/mysqlclient/
解决方法:
根绝报错信息,得知缺少python.h文件,因此添加python对应的devel文件就可以。
因为我使用的是python3,执行如下命令,再重新执行安装命令,即可解决报错问题。(注:如果是python,则需要把改成python-devel执行即可)
sudo yum install python3-devel