发布时间:2019-08-24 09:29:18编辑:auto阅读(2202)
转载自:http://www.letuknowit.com/post/58.html
自己在centos上使用pip安装wxPython模块时,提示不能解压自动下载的bz2包。网上搜了下,问题与该转载文章相似。
在CentOS系统中安装Node.js,遇到如下错误
ImportError: No module named bz2:
File "/disk/src/node-v0.6.12/deps/v8/SConstruct", line 37:
import js2c, utils
File "/disk/src/node-v0.6.12/deps/v8/tools/js2c.py", line 36:
import bz2
Waf: Leaving directory `/disk/src/node-v0.6.12/out'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
make: *** [program] 错误 1该错误是因为Python没有bz2扩展,安装下bz2后,再重新安装下python。
yum install -y bzip2* cd ../Python-2.7.3/Modules/zlib //转载注:这里应该是作者笔误。在yum安装bzip2包后,需要进入 //python解压的目录,进行下面的python重编译操作 ./configure make make install cd ../../ python setup.py install
PS:在以上步骤之前,你需要先升级CentOS系统的Python到Python 2.7.3版本。
转载请注明:知识蚂蚁 Python 2.7.3安装bz2扩展
上一篇: python发送带有中文名的附件
下一篇: Python正则表达式的用法
51272
50713
41317
38129
32591
29500
28351
23215
23185
21508
1584°
2304°
1912°
1854°
2175°
1897°
2587°
4326°
4176°
2980°