Hello,<br><br>I'm new here and I plan to install pycrypto.<br><br>I downloaded the pycrypto-2.1.0 and put the command:<br><br>python setup.py install<br><br>There occur many error, the error log is:<br>---------------------------------------------------------------------------------------------------------------------------------------------<br>
warning: GMP library not found; Not building Crypto.PublicKey._fastmath.<br>src/MD2.c:31:20: error: Python.h: No such file or directory<br>src/MD2.c:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>
In file included from src/MD2.c:134:<br>src/hash_template.c:42: error: expected specifier-qualifier-list before ‘PyObject_HEAD’<br>src/hash_template.c:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’<br>
src/hash_template.c: In function ‘newALGobject’:<br>src/hash_template.c:55: warning: implicit declaration of function ‘PyObject_New’<br>src/hash_template.c:55: error: expected expression before ‘ALGobject’<br>src/hash_template.c:55: warning: assignment makes pointer from integer without a cast<br>
src/hash_template.c: At top level:<br>src/hash_template.c:62: error: expected ‘)’ before ‘*’ token<br>src/hash_template.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>src/hash_template.c:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>
src/hash_template.c:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>src/hash_template.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>src/hash_template.c:160: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALG_methods’<br>
src/hash_template.c:169: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>src/hash_template.c:178: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALGtype’<br>src/hash_template.c:203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br>
src/hash_template.c:237: error: array type has incomplete element type<br>src/hash_template.c:238: error: ‘PyCFunction’ undeclared here (not in a function)<br>src/hash_template.c:238: error: expected ‘}’ before ‘ALG_new’<br>
src/hash_template.c: In function ‘initMD2’:<br>src/hash_template.c:254: error: ‘PyObject’ undeclared (first use in this function)<br>src/hash_template.c:254: error: (Each undeclared identifier is reported only once<br>src/hash_template.c:254: error: for each function it appears in.)<br>
src/hash_template.c:254: error: ‘m’ undeclared (first use in this function)<br>src/hash_template.c:256: error: ‘ALGtype’ undeclared (first use in this function)<br>src/hash_template.c:256: error: ‘PyType_Type’ undeclared (first use in this function)<br>
src/hash_template.c:257: warning: implicit declaration of function ‘Py_InitModule’<br>src/hash_template.c:260: error: ‘o’ undeclared (first use in this function)<br>src/hash_template.c:260: warning: implicit declaration of function ‘PyInt_FromLong’<br>
src/hash_template.c:260: warning: implicit declaration of function ‘PyDict_SetItemString’<br>src/hash_template.c:260: warning: implicit declaration of function ‘PyModule_GetDict’<br>src/hash_template.c:260: warning: implicit declaration of function ‘Py_DECREF’<br>
src/hash_template.c:263: warning: implicit declaration of function ‘PyErr_Occurred’<br>src/hash_template.c:264: warning: implicit declaration of function ‘Py_FatalError’<br>error: command 'gcc' failed with exit status 1<br>
-----------------------------------------------------------------------------------------------------------------------------------------<br>
<br>Is this the problem of the GCC version?<br>My gcc version is 4.4.1 and my python version is Python-2.6.4.<br clear="all"><br>Thank you for help!!<br><br>Best,<br>Tianyin<br>-- <br>Tianyin XU, ( 徐天音 )<br>State Key Laboratory for Novel Software Technology<br>
Department of Computer Science and Technology, Nanjing University<br>No. 22, Hankou Road, Nanjing 210093, P. R. China<br>
Homepage. <a href="http://cs.nju.edu.cn/dislab/xuty/xuty.html" target="_blank">http://cs.nju.edu.cn/dislab/xuty/xuty.html</a><br>