在python2.7 + centos6.5环境下使用python setup.py install 安装blist1.3.6时报错:

blist/_blist.c:5385: error: ‘i’ undeclared (first use in this function)
blist/_blist.c:5385: error: ‘n’ undeclared (first use in this function)
blist/_blist.c:5387: error: ‘j’ undeclared (first use in this function)
blist/_blist.c:5388: error: expected ‘)’ before numeric constant
blist/_blist.c:5392: error: expected ‘)’ before numeric constant
blist/_blist.c:5395: error: ‘tsum’ undeclared (first use in this function)
blist/_blist.c:5409: error: expected ‘;’ before ‘pos’
blist/_blist.c:5410: error: ‘pos’ undeclared (first use in this function)
blist/_blist.c: At top level:
blist/_blist.c:5438: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
blist/_blist.c: In function ‘sort_uint64’:
blist/_blist.c:5441: error: ‘Py_ssize_t’ undeclared (first use in this function)
blist/_blist.c:5441: error: expected ‘;’ before ‘i’
blist/_blist.c:5442: error: ‘histogram_array_t’ undeclared (first use in this function)
blist/_blist.c:5442: error: ‘histograms’ undeclared (first use in this function)
blist/_blist.c:5444: warning: incompatible implicit declaration of built-in function ‘memset’
blist/_blist.c:5444: error: ‘sums’ undeclared (first use in this function)
blist/_blist.c:5445: error: ‘count’ undeclared (first use in this function)
blist/_blist.c:5447: error: expected expression before ‘sortwrapperobject’
blist/_blist.c:5451: error: expected ‘)’ before numeric constant
blist/_blist.c:5456: error: expected ‘)’ before numeric constant
blist/_blist.c:5458: error: ‘i’ undeclared (first use in this function)
blist/_blist.c:5458: error: ‘n’ undeclared (first use in this function)
blist/_blist.c:5459: error: ‘PY_UINT64_T’ undeclared (first use in this function)
blist/_blist.c:5459: error: expected ‘;’ before ‘v’
blist/_blist.c:5460: error: ‘j’ undeclared (first use in this function)
blist/_blist.c:5461: error: ‘v’ undeclared (first use in this function)
blist/_blist.c:5461: error: expected ‘)’ before numeric constant
blist/_blist.c:5465: error: expected ‘)’ before numeric constant
blist/_blist.c:5468: error: ‘tsum’ undeclared (first use in this function)
blist/_blist.c:5479: error: expected ‘;’ before ‘fi’
blist/_blist.c:5480: error: expected ‘;’ before ‘pos’
blist/_blist.c:5481: error: ‘pos’ undeclared (first use in this function)
blist/_blist.c:5482: error: ‘fi’ undeclared (first use in this function)
blist/_blist.c: At top level:
blist/_blist.c:5506: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sort’
blist/_blist.c:5635: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:5659: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:5668: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5674: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5705: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:5734: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5750: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5770: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5778: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5816: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5843: error: expected ‘)’ before ‘*’ token
blist/_blist.c:5921: error: expected ‘)’ before ‘*’ token
blist/_blist.c:6076: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘py_blist_length’
blist/_blist.c:6082: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6099: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6122: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6164: error: expected ‘)’ before ‘*’ token
blist/_blist.c:6192: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6234: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6279: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6302: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6361: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6537: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6660: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6675: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6702: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6754: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6787: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6829: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6843: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6850: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6897: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:6912: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:7030: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:7050: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:7081: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
blist/_blist.c:7101: error: expected ‘)’ before string constant
blist/_blist.c:7103: error: expected ‘)’ before string constant
blist/_blist.c:7105: error: expected ‘)’ before string constant
blist/_blist.c:7107: error: expected ‘)’ before string constant
blist/_blist.c:7109: error: expected ‘)’ before string constant
blist/_blist.c:7111: error: expected ‘)’ before string constant
blist/_blist.c:7113: error: expected ‘)’ before string constant
blist/_blist.c:7115: error: expected ‘)’ before string constant
blist/_blist.c:7117: error: expected ‘)’ before string constant
blist/_blist.c:7119: error: expected ‘)’ before string constant
blist/_blist.c:7121: error: expected ‘)’ before string constant
blist/_blist.c:7124: error: expected ‘)’ before string constant
blist/_blist.c:7126: error: expected ‘)’ before string constant
blist/_blist.c:7128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘blist_methods’
blist/_blist.c:7156: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘blist_internal_methods’
blist/_blist.c:7167: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘blist_as_sequence’
blist/_blist.c:7181: error: expected ‘)’ before string constant
blist/_blist.c:7184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘blist_as_mapping’
blist/_blist.c:7192: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘blist_as_number’
blist/_blist.c:7272: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyBList_Type’
blist/_blist.c:7319: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyRootBList_Type’
blist/_blist.c:7370: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘module_methods’
blist/_blist.c: In function ‘init_blist_types1’:
blist/_blist.c:7376: error: expected expression before ‘)’ token
blist/_blist.c:7378: error: ‘PyBList_Type’ undeclared (first use in this function)
blist/_blist.c:7378: error: ‘PyType_Type’ undeclared (first use in this function)
blist/_blist.c:7379: error: ‘PyRootBList_Type’ undeclared (first use in this function)
blist/_blist.c:7380: error: ‘PyBListIter_Type’ undeclared (first use in this function)
blist/_blist.c:7381: error: ‘PyBListReverseIter_Type’ undeclared (first use in this function)
blist/_blist.c: In function ‘init_blist_types2’:
blist/_blist.c:7394: warning: implicit declaration of function ‘PyType_Ready’
blist/_blist.c:7394: error: ‘PyRootBList_Type’ undeclared (first use in this function)
blist/_blist.c:7395: error: ‘PyBList_Type’ undeclared (first use in this function)
blist/_blist.c:7396: error: ‘PyBListIter_Type’ undeclared (first use in this function)
blist/_blist.c:7397: error: ‘PyBListReverseIter_Type’ undeclared (first use in this function)
blist/_blist.c: At top level:
blist/_blist.c:7404: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_blist’

原因是因为python-devel模块没有安装,使用yum install python-devel -y安装python-devel模块后解决该问题!