pip install  pycrypto报错

src/MD2.c:31:20: error: Python.h: No such file or directory    src/MD2.c:120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    In file included from src/MD2.c:136:    src/hash_template.c:48: error: expected specifier-qualifier-list before ‘PyObject_HEAD’    src/hash_template.c:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’    src/hash_template.c: In function ‘newALGobject’:    src/hash_template.c:69: warning: implicit declaration of function ‘PyObject_New’    src/hash_template.c:69: error: expected expression before ‘ALGobject’    src/hash_template.c: At top level:    src/hash_template.c:76: error: expected ‘)’ before ‘*’ token    src/hash_template.c:91: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    src/hash_template.c:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    src/hash_template.c:122: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    src/hash_template.c:162: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    src/hash_template.c:181: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALG_methods’    src/hash_template.c:189: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    src/hash_template.c:214: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALGtype’    src/hash_template.c:265: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token    src/hash_template.c:298: error: array type has incomplete element type    src/hash_template.c:299: error: ‘PyCFunction’ undeclared here (not in a function)    src/hash_template.c:299: error: expected ‘}’ before ‘ALG_new’    src/hash_template.c: In function ‘initMD2’:    src/hash_template.c:333: error: ‘PyObject’ undeclared (first use in this function)    src/hash_template.c:333: error: (Each undeclared identifier is reported only once    src/hash_template.c:333: error: for each function it appears in.)    src/hash_template.c:333: error: ‘m’ undeclared (first use in this function)    src/hash_template.c:345: error: ‘ALGtype’ undeclared (first use in this function)    src/hash_template.c:345: error: ‘PyType_Type’ undeclared (first use in this function)    src/hash_template.c:346: warning: implicit declaration of function ‘Py_InitModule’    src/hash_template.c:350: error: ‘o’ undeclared (first use in this function)    src/hash_template.c:350: warning: implicit declaration of function ‘PyInt_FromLong’    src/hash_template.c:350: warning: implicit declaration of function ‘PyDict_SetItemString’    src/hash_template.c:350: warning: implicit declaration of function ‘PyModule_GetDict’    src/hash_template.c:350: warning: implicit declaration of function ‘Py_DECREF’    src/hash_template.c:354: warning: implicit declaration of function ‘PyErr_Occurred’    src/hash_template.c:355: warning: implicit declaration of function ‘Py_FatalError’    error: command 'gcc' failed with exit status 1        ----------------------------------------  Rolling back uninstall of pycryptoCommand "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-mMnSOr/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', opplace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-aYu2Q8-record/install-record.txt --single-version-externally-managed --compile" fain /tmp/pip-build-mMnSOr/pycrypto

安装一下两个包

yum install gcc python-devel