2012-12-05 134 views
6

我在Debian Squeeze上,我想安裝模塊igraph。所以,我經歷的所有steps,但是當我試圖做Python模塊安裝錯誤:命令'gcc'失敗,退出狀態1

python setup.py build 

我得到的錯誤,說:

error: command 'gcc' failed with exit status 1 

但是,在終端的消息我得到的錯誤,像這樣的開頭:

In file included from src/arpackobject.c:23: 
src/arpackobject.h:26:20: error: Python.h: No such file or directory 

我該如何解決這個問題?

這裏是終端的全部輸出:

# python setup.py build 
Include path: /usr/local/include/igraph 
Library path: /usr/local/lib 
running build 
running build_py 
running build_ext 
building 'igraph._igraph' extension 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -c src/arpackobject.c -o build/temp.linux-x86_64-2.7/src/arpackobject.o 
In file included from src/arpackobject.c:23: 
src/arpackobject.h:26:20: error: Python.h: No such file or directory 
In file included from src/arpackobject.h:28, 
       from src/arpackobject.c:23: 
src/graphobject.h:28:26: error: structmember.h: No such file or directory 
In file included from src/graphobject.h:29, 
       from src/arpackobject.h:28, 
       from src/arpackobject.c:23: 
src/common.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/common.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
In file included from src/arpackobject.h:28, 
       from src/arpackobject.c:23: 
src/graphobject.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘igraphmodule_GraphType’ 
src/graphobject.h:39: error: expected specifier-qualifier-list before ‘PyObject_HEAD’ 
src/graphobject.h:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:55: error: expected declaration specifiers or ‘...’ before ‘visitproc’ 
src/graphobject.h:57: error: expected declaration specifiers or ‘...’ before ‘PyObject’ 
src/graphobject.h:57: error: expected declaration specifiers or ‘...’ before ‘PyObject’ 
src/graphobject.h:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:78: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:82: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:84: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:86: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:87: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:88: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:89: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:90: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:91: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:94: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:97: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:98: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:99: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:102: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:104: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:106: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:107: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:109: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:113: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:114: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:115: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:116: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:121: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:122: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:123: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:124: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:125: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:133: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:134: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:141: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:146: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:151: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:153: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:154: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:155: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:156: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:158: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:160: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:161: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:162: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:163: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:164: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:166: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:167: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:169: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:170: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:171: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:172: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:175: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:176: error: expected declaration specifiers or ‘...’ before ‘PyObject’ 
src/graphobject.h:176: error: expected declaration specifiers or ‘...’ before ‘PyObject’ 
src/graphobject.h:177: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:178: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:179: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:181: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:182: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:185: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:186: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:187: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:189: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:190: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:192: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:193: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:195: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:197: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:198: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:200: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:201: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:202: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:204: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:205: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:206: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:207: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:209: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:210: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:211: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:212: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:213: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:214: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
In file included from src/arpackobject.h:28, 
       from src/arpackobject.c:23: 
src/graphobject.h:215: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:216: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:217: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:218: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:219: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:221: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:223: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/graphobject.h:224: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
In file included from src/arpackobject.c:23: 
src/arpackobject.h:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘igraphmodule_ARPACKOptionsType’ 
src/arpackobject.h:41: error: expected specifier-qualifier-list before ‘PyObject_HEAD’ 
src/arpackobject.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.h:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.h:54: error: expected ‘)’ before ‘*’ token 
In file included from src/arpackobject.c:25: 
src/error.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/error.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
In file included from src/arpackobject.c:26: 
src/py2compat.h:80: error: expected ‘)’ before ‘*’ token 
src/arpackobject.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.c:34: error: expected ‘)’ before ‘*’ token 
src/arpackobject.c:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_dealloc’: 
src/arpackobject.c:61: warning: implicit declaration of function ‘PyObject_Del’ 
src/arpackobject.c:61: error: ‘PyObject’ undeclared (first use in this function) 
src/arpackobject.c:61: error: (Each undeclared identifier is reported only once 
src/arpackobject.c:61: error: for each function it appears in.) 
src/arpackobject.c:61: error: expected expression before ‘)’ token 
src/arpackobject.c: At top level: 
src/arpackobject.c:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.c:123: error: expected declaration specifiers or ‘...’ before ‘PyObject’ 
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_setattr’: 
src/arpackobject.c:124: error: ‘value’ undeclared (first use in this function) 
src/arpackobject.c:125: warning: implicit declaration of function ‘PyErr_SetString’ 
src/arpackobject.c:125: error: ‘PyExc_TypeError’ undeclared (first use in this function) 
src/arpackobject.c:128: warning: implicit declaration of function ‘strcmp’ 
src/arpackobject.c:130: warning: implicit declaration of function ‘PyInt_Check’ 
src/arpackobject.c:131: warning: implicit declaration of function ‘PyInt_AsLong’ 
src/arpackobject.c:133: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:135: error: ‘PyExc_ValueError’ undeclared (first use in this function) 
src/arpackobject.c:144: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:145: warning: implicit declaration of function ‘PyFloat_Check’ 
src/arpackobject.c:146: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:146: warning: implicit declaration of function ‘PyFloat_AsDouble’ 
src/arpackobject.c:152: error: ‘PyExc_AttributeError’ undeclared (first use in this function) 
src/arpackobject.c: In function ‘igraphmodule_ARPACKOptions_get’: 
src/arpackobject.c:162: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:162: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:163: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:163: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:164: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:164: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:165: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:165: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:166: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:166: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:167: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:168: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c:168: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params’ 
src/arpackobject.c:170: error: ‘igraphmodule_ARPACKOptionsObject’ has no member named ‘params_out’ 
src/arpackobject.c: At top level: 
src/arpackobject.c:179: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
src/arpackobject.c:191: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘igraphmodule_ARPACKOptions_methods’ 
src/arpackobject.c:204: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘igraphmodule_ARPACKOptions_getseters’ 
src/arpackobject.c:215: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘igraphmodule_ARPACKOptionsType’ 
error: command 'gcc' failed with exit status 1 

回答

17

Python的頭文件是在python-dev包,其中包括:

Header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications.

嘗試:

apt-get install python-dev 

這應該做的伎倆。您也可以下載它from here

編輯

嘗試以下操作:

apt-get install python-devel 
or 
apt-get install python2.7-dev 
+0

我已經安裝了python-dev。 #apt-get install python-dev 正在讀取軟件包列表...完成 軟件包依賴關係樹 正在讀取狀態信息...完成 python-dev已經是最新版本。 0升級,0新安裝,0刪除和0未升級。它仍然是一樣的。還有其他建議嗎? – Belphegor

+0

回答更新,讓我知道它是否有幫助! – Kuf

+0

它找不到這兩個軟件包。對於python-devel,它說:E:無法找到軟件包python-devel,對於python2.7-dev,它給了我兩個錯誤:E:無法找到軟件包python2.7-dev E:找不到任何軟件包通過正則表達式'python2.7-dev'。我現在應該怎麼做? – Belphegor

3

丟失的文件是在一個Debian系統上的包的python-dev的。安裝它,你很好。

+0

我已經安裝了python-dev,但那並沒有解決我的問題。還有其他建議嗎? – Belphegor

2

您可能需要安裝下面的包,那麼。

python-all-dev 
相關問題