我已經安裝在我的主目錄下。缺少python bz2模塊
[[email protected]~ dev1]$ /home/spatel/python-2.7.3/bin/python -V
Python 2.7.3
我試圖運行的需要蟒蛇2.7.x版本的一個劇本,我收到失蹤BZ2錯誤
[[email protected]~ dev1]$ ./import_logs.py
Traceback (most recent call last):
File "./import_logs.py", line 13, in <module>
import bz2
ImportError: No module named bz2
我試圖安裝BZ2模塊,但我得到了很多錯誤
的[[email protected] python-bz2-1.1]$ /home/spatel/python-2.7.3/bin/python setup.py install
...
...
...
bz2.c:1765: error: âBZ_FINISH_OKâ undeclared (first use in this function)
bz2.c:1765: warning: comparison between pointer and integer
bz2.c:1771: error: âPyMemberDefâ has no member named âavail_outâ
bz2.c:1778: error: âPyMemberDefâ has no member named ânext_outâ
bz2.c:1778: error: âPyMemberDefâ has no member named âtotal_out_hi32â
bz2.c:1778: error: âPyMemberDefâ has no member named âtotal_out_lo32â
bz2.c:1778: error: invalid operands to binary +
bz2.c:1778: warning: statement with no effect
bz2.c:1779: error: âPyMemberDefâ has no member named âavail_outâ
bz2.c:1779: error: âPyMemberDefâ has no member named ânext_outâ
bz2.c:1779: error: invalid operands to binary -
bz2.c:1779: error: invalid operands to binary -
bz2.c:1779: warning: statement with no effect
bz2.c:1783: error: âPyMemberDefâ has no member named âavail_outâ
bz2.c:1784: error: âPyMemberDefâ has no member named âtotal_out_hi32â
bz2.c:1784: error: âPyMemberDefâ has no member named âtotal_out_lo32â
bz2.c:1784: warning: passing argument 2 of â_PyString_Resizeâ makes integer from pointer without a cast
error: command 'gcc' failed with exit status 1
Fedora包是bzip2-devel(至少從Fedora 14開始) –
謝謝,更新:) – jviotti
我必須安裝所有這些才能在CentOS6.4上構建一個可工作的python2.7。 yum install -y bzip2-devel zlib zlib-devel openssl openssl-devel – jamshid