[pycrypto] Installation Problem
don at amberfisharts.com
don at amberfisharts.com
Tue Feb 23 05:12:09 CST 2010
Hi,
obviously the problem is
> src/MD2.c:31:20: error: Python.h: No such file or directory
why it can't find the header is another question.
Maybe you are on a system where there are separate developer-version of
packages
like python? One example of such a system is Ubuntu.
In this case they are usually called python-dev or something similar. You
always
need to install the "-dev" versions of packages you are "#include"-ing in
source
code.
If this doesn't help, then I guess you might need to provide some more
information.
what system are you using? Can you find Python.h manually? Where is it?
etc...
regards
//Lorenz
On Sun, 21 Feb 2010 23:38:46 +0100, Tianyin Xu <xuty1985 at gmail.com> wrote:
> Hello,
>
> I'm new here and I plan to install pycrypto.
>
> I downloaded the pycrypto-2.1.0 and put the command:
>
> python setup.py install
>
> There occur many error, the error log is:
>
---------------------------------------------------------------------------------------------------------------------------------------------
> warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
> src/MD2.c:31:20: error: Python.h: No such file or directory
> src/MD2.c:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘*’ token
> In file included from src/MD2.c:134:
> src/hash_template.c:42: error: expected specifier-qualifier-list before
> ‘PyObject_HEAD’
> src/hash_template.c:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘PyTypeObject’
> src/hash_template.c: In function ‘newALGobject’:
> src/hash_template.c:55: warning: implicit declaration of function
> ‘PyObject_New’
> src/hash_template.c:55: error: expected expression before ‘ALGobject’
> src/hash_template.c:55: warning: assignment makes pointer from integer
> without a cast
> src/hash_template.c: At top level:
> src/hash_template.c:62: error: expected ‘)’ before ‘*’ token
> src/hash_template.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> src/hash_template.c:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> src/hash_template.c:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> src/hash_template.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> src/hash_template.c:160: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘ALG_methods’
> src/hash_template.c:169: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> src/hash_template.c:178: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘ALGtype’
> src/hash_template.c:203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> src/hash_template.c:237: error: array type has incomplete element type
> src/hash_template.c:238: error: ‘PyCFunction’ undeclared here (not in a
> function)
> src/hash_template.c:238: error: expected ‘}’ before ‘ALG_new’
> src/hash_template.c: In function ‘initMD2’:
> src/hash_template.c:254: error: ‘PyObject’ undeclared (first use in this
> function)
> src/hash_template.c:254: error: (Each undeclared identifier is reported
> only
> once
> src/hash_template.c:254: error: for each function it appears in.)
> src/hash_template.c:254: error: ‘m’ undeclared (first use in this
> function)
> src/hash_template.c:256: error: ‘ALGtype’ undeclared (first use in this
> function)
> src/hash_template.c:256: error: ‘PyType_Type’ undeclared (first use in
> this
> function)
> src/hash_template.c:257: warning: implicit declaration of function
> ‘Py_InitModule’
> src/hash_template.c:260: error: ‘o’ undeclared (first use in this
> function)
> src/hash_template.c:260: warning: implicit declaration of function
> ‘PyInt_FromLong’
> src/hash_template.c:260: warning: implicit declaration of function
> ‘PyDict_SetItemString’
> src/hash_template.c:260: warning: implicit declaration of function
> ‘PyModule_GetDict’
> src/hash_template.c:260: warning: implicit declaration of function
> ‘Py_DECREF’
> src/hash_template.c:263: warning: implicit declaration of function
> ‘PyErr_Occurred’
> src/hash_template.c:264: warning: implicit declaration of function
> ‘Py_FatalError’
> error: command 'gcc' failed with exit status 1
>
-----------------------------------------------------------------------------------------------------------------------------------------
>
> Is this the problem of the GCC version?
> My gcc version is 4.4.1 and my python version is Python-2.6.4.
>
> Thank you for help!!
>
> Best,
> Tianyin
More information about the pycrypto
mailing list