• 欢迎访问金笔头博客,这是一个持续学习者的自留地,欢迎访问我的github:点击进入

RuntimeError: Compression requires the (missing) zlib module

python eason 8852次浏览 19个评论 扫描二维码

问题:执行Python命令python setup.py install出错

[root@WYS distribute-0.6.49]# python setup.py install
Before install bootstrap.
Scanning installed packages
No setuptools distribution found
running install
running bdist_egg
running egg_info
writing distribute.egg-info/PKG-INFO
writing top-level names to distribute.egg-info/top_level.txt
writing dependency_links to distribute.egg-info/dependency_links.txt
writing entry points to distribute.egg-info/entry_points.txt
reading manifest file 'distribute.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'distribute.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
copying distribute.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying distribute.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying distribute.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying distribute.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying distribute.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
creating 'dist/distribute-0.6.49-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
Traceback (most recent call last):
  File "setup.py", line 232, in 

    scripts = scripts,
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/root/Python-2.7.6/distribute-0.6.49/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/root/Python-2.7.6/distribute-0.6.49/setuptools/command/install.py", line 93, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/root/Python-2.7.6/distribute-0.6.49/setuptools/command/bdist_egg.py", line 241, in run
    dry_run=self.dry_run, mode=self.gen_header())
  File "/root/Python-2.7.6/distribute-0.6.49/setuptools/command/bdist_egg.py", line 540, in make_zipfile
    z = zipfile.ZipFile(zip_filename, mode, compression=compression)
  File "/usr/local/lib/python2.7/zipfile.py", line 732, in __init__
    "Compression requires the (missing) zlib module"
RuntimeError: Compression requires the (missing) zlib module

解决方案:

[root@WYS Python-2.7.6]# yum install zlib
[root@WYS Python-2.7.6]# yum install zlib-devel
#安装完成后,重新编译 python2.7即可
[root@WYS Python-2.7.6]# ./configure
[root@WYS Python-2.7.6]# make && make altinstall

金笔头博客, 版权所有丨如未注明 , 均为原创, 转载请注明RuntimeError: Compression requires the (missing) zlib module
喜欢 (1)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(19)个小伙伴在吐槽
  1. 2Z3ShO Say, you got a nice blog article.Really thank you! Fantastic.
    fiverr backlinks2016-02-04 09:17 Reply Windows XP | Internet Explorer 6.0
  2. Thanks again for the post.Much thanks again. Fantastic.
    missy monroe2016-02-03 02:27 Reply 未知操作系统 | Firefox 3.8
  3. 5jLwES You write Formidable articles, keep up good work.
    crorkservice2016-01-31 06:32 Reply Windows XP | Internet Explorer 6.0
  4. Fantastic article post.Really thank you! Really Cool.
    jada fire2016-01-31 05:09 Reply 未知操作系统 | Firefox 3.8
    • you are welcome
      wangyisheng2016-02-01 19:58 Reply Windows 7 | Chrome 47.0.2526.106
  5. I just want to say I am new to blogs and certainly savored your web blog. Almost certainly I’m planning to bookmark your website . You absolutely have remarkable articles and reviews. With thanks for sharing with us your blog site.
    recommended you read2016-01-26 07:38 Reply Windows 7 | Firefox 3.5.3
  6. hola amigos, funcionan los comentarios?
    Dorothy2016-01-06 23:29 Reply Windows XP | Opera 8.50
    • what? :?:
      wangyisheng2016-01-06 23:37 Reply Windows 7 | Chrome 47.0.2526.106
  7. I think this is a real great blog post. Much obliged.
    leah luv2016-01-02 05:32 Reply Windows XP | Opera 9.64
  8. When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four e-mails with the same comment. Is there any way you can remove me from that service? Thank you!
    nike air mag pas cher2015-12-26 20:04 Reply Windows 7 | 未知浏览器
    • ok
      wangyisheng2015-12-28 17:38 Reply Windows 7 | Chrome 47.0.2526.106
    • i have deleted your email, you will not get any notify from my site :smile:
      wangyisheng2015-12-28 17:40 Reply Windows 7 | Chrome 47.0.2526.106
  9. Inspiring story there. What happened after? Take care!
    moncler coats flannels uk2015-12-26 17:38 Reply Windows 7 | 未知浏览器
  10. You're so awesome! I don't believe I've truly read through a single thing like this before. So great to discover somebody with some genuine thoughts on this subject. Really.. many thanks for starting this up. This web site is something that is needed on the internet, someone with a bit of originality!
    oakley juliet pas cher occasion2015-12-16 00:01 Reply Windows 7 | 未知浏览器
    • thank you :razz:
      wangyisheng2015-12-16 00:14 Reply 未知操作系统 | Safari 601.1
  11. Hi there, after reading this awesome paragraph i am also cheerful to share my familiarity here with colleagues.
    parajumpers ladies coats debenhams2015-12-13 20:53 Reply Windows 7 | 未知浏览器
  12. Hello everyone, it's my first go to see at this website, and paragraph is actually fruitful in favor of me, keep up posting these types of articles.
    parajumpers uitverkoop amsterdam noord2015-12-11 07:01 Reply Windows 7 | 未知浏览器
    • ok,i will
      wangyisheng2015-12-11 10:10 Reply Windows 7 | Chrome 45.0.2454.101
  13. Hi, i feel that i noticed you visited my weblog so i got here to go back the want?.I am attempting to to find issues to improve my website!I guess its ok to use a few of your ideas!!
    rivenditore ray ban milano2015-12-07 20:17 Reply Windows 7 | 未知浏览器