Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 01/05/2010, à 10:49

elendil

[resolu] Erreur compilation librairie python

Bonjour, je travaille sur code où j'ai besoin de la librairie aipy (cf http://pypi.python.org/pypi/aipy et http://casper.berkeley.edu/astrobaki/index.php/AIPY ). Au travail, je bosse sur un serveur Red hat où tout est déjà installé.
Mais je voudrais pouvoir l'installer sur mon laptop. J'ai donc télécharger la librairie, et j'ai voulu la compiler mais j'ai une jolie liste d'erreurs que je ne comprend pas. Est-ce que quelqu'un peut m'aider ?

j'ai fait :

sudo easy_install aipy

Et je me retrouve avec ces messages :

Searching for aipy
Reading http://pypi.python.org/simple/aipy/
Reading http://setiathome.berkeley.edu/~aparsons/aipy/aipy.cgi
Reading http://setiathome.berkeley.edu/~aparsons/aipy
Best match: aipy 0.9.1
Downloading http://pypi.python.org/packages/source/a/aipy/aipy-0.9.1.tar.gz#md5=aa39d57302972bd3c2ec7283a2c7736e
Processing aipy-0.9.1.tar.gz
Running aipy-0.9.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-NJpAQP/aipy-0.9.1/egg-dist-tmp-7DL75J
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
src/_healpix/healpix_wrap.cpp:15:20: error: Python.h: Aucun fichier ou dossier de ce type
In file included from /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:61,
                 from /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from src/_healpix/healpix_wrap.cpp:16:
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/npy_common.h:71:2: error: #error Must use Python with unicode enabled.
In file included from src/_healpix/healpix_wrap.cpp:18:
src/_healpix/cxx/Healpix_cxx/healpix_map.h:102: warning: ignoring #pragma omp parallel
src/_healpix/cxx/Healpix_cxx/healpix_map.h:105: warning: ignoring #pragma omp for
src/_healpix/cxx/Healpix_cxx/healpix_map.h:125: warning: ignoring #pragma omp parallel
src/_healpix/cxx/Healpix_cxx/healpix_map.h:128: warning: ignoring #pragma omp for
In file included from /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from src/_healpix/healpix_wrap.cpp:16:
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:181: error: 'Py_intptr_t' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:182: error: 'Py_uintptr_t' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:284: error: expected initializer before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:285: error: typedef 'PyArray_SetItemFunc' is initialized (use decltype instead)
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:285: error: 'PyObject' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:285: error: expected primary-expression before ',' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:285: error: expected primary-expression before 'void'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:285: error: expected primary-expression before 'void'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:287: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:287: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:288: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:298: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:298: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:300: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:300: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:301: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:303: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:308: error: typedef 'PyArray_ScanFunc' is initialized (use decltype instead)
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:308: error: 'FILE' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:308: error: 'fp' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:308: error: expected primary-expression before 'void'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:309: error: expected primary-expression before 'char'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:309: error: expected primary-expression before 'struct'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:313: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:315: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:316: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:316: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:318: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:322: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:324: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:325: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:326: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:327: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:327: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:328: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:328: error: 'npy_intp' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:332: error: ISO C++ forbids declaration of 'npy_intp' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:332: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:345: error: ISO C++ forbids declaration of 'PyArray_GetItemFunc' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:345: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:346: error: ISO C++ forbids declaration of 'PyArray_SetItemFunc' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:346: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:371: error: ISO C++ forbids declaration of 'PyArray_ScanFunc' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:371: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:397: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:397: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:446: error: 'PyObject_HEAD' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:465: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:465: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:469: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:469: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:478: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:478: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:488: error: ISO C++ forbids declaration of 'PyObject_HEAD' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:489: error: expected ';' before 'char'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:491: error: ISO C++ forbids declaration of 'npy_intp' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:491: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:492: error: ISO C++ forbids declaration of 'npy_intp' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:492: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:494: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:494: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:504: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:504: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:513: error: 'PyObject_HEAD' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:521: error: 'PyObject_HEAD' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:524: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:528: error: 'PyObject' has not been declared
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:670: error: ISO C++ forbids declaration of 'PyObject_HEAD' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:671: error: expected ';' before 'int'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:672: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:673: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:674: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:675: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:676: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:677: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:817: error: ISO C++ forbids declaration of 'PyObject_HEAD' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:818: error: expected ';' before 'int'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:819: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:820: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:822: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:871: error: ISO C++ forbids declaration of 'PyObject_HEAD' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:875: error: expected ';' before 'int'
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:877: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:879: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:881: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:897: error: 'npy_intp' does not name a type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:899: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:899: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1084: error: ISO C++ forbids declaration of 'npy_intp' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1084: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1085: error: ISO C++ forbids declaration of 'npy_intp' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1085: error: expected ';' before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1087: error: ISO C++ forbids declaration of 'PyObject' with no type
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1087: error: expected ';' before '*' token
In file included from /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:1099,
                 from /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from src/_healpix/healpix_wrap.cpp:16:
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:407: error: 'NULL' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h: In function 'int _import_array()':
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:971: error: 'PyObject' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:971: error: 'numpy' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:971: error: 'PyImport_ImportModule' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:972: error: 'c_api' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:972: error: 'NULL' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:974: error: 'PyObject_GetAttrString' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:975: error: 'Py_DECREF' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:976: error: 'PyCObject_Check' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:977: error: 'PyCObject_AsVoidPtr' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:979: error: 'Py_DECREF' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:984: error: 'PyExc_RuntimeError' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:986: error: 'PyErr_Format' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:996: error: 'PyExc_RuntimeError' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:996: error: 'PyErr_Format' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1007: error: 'PyExc_RuntimeError' was not declared in this scope
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1008: error: 'PyErr_Format' was not declared in this scope
src/_healpix/healpix_wrap.cpp: At global scope:
src/_healpix/healpix_wrap.cpp:68: error: 'PyObject_HEAD' does not name a type
src/_healpix/healpix_wrap.cpp: In function 'void HPBObject_dealloc(HPBObject*)':
src/_healpix/healpix_wrap.cpp:74: error: 'struct HPBObject' has no member named 'ob_type'
src/_healpix/healpix_wrap.cpp:74: error: 'PyObject' was not declared in this scope
src/_healpix/healpix_wrap.cpp:74: error: expected primary-expression before ')' token
src/_healpix/healpix_wrap.cpp: At global scope:
src/_healpix/healpix_wrap.cpp:78: error: expected initializer before '*' token
src/_healpix/healpix_wrap.cpp:86: error: 'PyObject' has not been declared
src/_healpix/healpix_wrap.cpp:86: error: 'PyObject' has not been declared
src/_healpix/healpix_wrap.cpp: In function 'int HPBObject_init(HPBObject*, int*, int*)':
src/_healpix/healpix_wrap.cpp:89: error: 'PyObject' was not declared in this scope
src/_healpix/healpix_wrap.cpp:89: error: 'scheme_str' was not declared in this scope
src/_healpix/healpix_wrap.cpp:90: warning: deprecated conversion from string constant to 'char*'
src/_healpix/healpix_wrap.cpp:90: warning: deprecated conversion from string constant to 'char*'
src/_healpix/healpix_wrap.cpp:92: error: 'PyArg_ParseTupleAndKeywords' was not declared in this scope
src/_healpix/healpix_wrap.cpp:95: error: 'PyString_AsString' was not declared in this scope
src/_healpix/healpix_wrap.cpp:95: error: 'strcmp' was not declared in this scope
src/_healpix/healpix_wrap.cpp:97: error: 'PyExc_ValueError' was not declared in this scope
src/_healpix/healpix_wrap.cpp:97: error: 'PyErr_Format' was not declared in this scope
src/_healpix/healpix_wrap.cpp:102: error: 'struct HPBObject' has no member named 'hpb'
src/_healpix/healpix_wrap.cpp:103: error: 'struct HPBObject' has no member named 'hpb'
src/_healpix/healpix_wrap.cpp:105: error: 'PyExc_RuntimeError' was not declared in this scope
src/_healpix/healpix_wrap.cpp:105: error: 'PyErr_Format' was not declared in this scope
src/_healpix/healpix_wrap.cpp: At global scope:
src/_healpix/healpix_wrap.cpp:119: error: expected initializer before '*' token
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:968: warning: 'int _import_array()' defined but not used
src/_healpix/healpix_wrap.cpp:73: warning: 'void HPBObject_dealloc(HPBObject*)' defined but not used
src/_healpix/healpix_wrap.cpp:86: warning: 'int HPBObject_init(HPBObject*, int*, int*)' defined but not used
error: Setup script exited with error: command 'gcc' failed with exit status 1

Dernière modification par elendil (Le 21/11/2010, à 18:10)

Hors ligne

#2 Le 03/05/2010, à 08:03

elendil

Re : [resolu] Erreur compilation librairie python

S'il vous plaît personne ne peut m'aider ? sad

J'ai trouvé un topic sur le forum de Fedora, mais ce n'est pas exactement la même erreur. . .
Je suis coincé, il n'y a personne pour m'aider?

Dernière modification par elendil (Le 06/05/2010, à 11:43)

Hors ligne

#3 Le 06/05/2010, à 11:44

elendil

Re : [resolu] Erreur compilation librairie python

Voici le lien vers le forum fedora où il est aussi question d'une erreur de compilation :
http://forums.fedora-fr.org/viewtopic.php?id=36628.

Personne pour m'aider ?

Hors ligne

#4 Le 25/06/2010, à 14:51

elendil

Re : [resolu] Erreur compilation librairie python

Up ?

Hors ligne

#5 Le 21/11/2010, à 18:10

elendil

Re : [resolu] Erreur compilation librairie python

J'ai trouvé la solution qui finalement est toute simple, il faut installer le paquet :

sudo apt-get install python-dev

Pour avoir le fichier python.h qui faisait défaut lors de la compilation !

Hors ligne