码迷,mamicode.com
首页 > 编程语言 > 详细

python 安装 setuptools Compression requires the (missing) zlib module 的解决方案

时间:2017-09-12 16:10:04      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:trace   name   ack   __init__   module   error   oracle   UI   lin   

安装 setuptools 的时候,报如下错误:


 creating ‘dist/setuptools-0.6c11-py2.7.egg‘ and adding ‘build/bdist.linux-x86_64/egg‘ to it
Traceback (most recent call last):
  File "setup.py", line 94, in <module>
    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 "/opt/oracle/sor/install/setuptools-0.6c11/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/opt/oracle/sor/install/setuptools-0.6c11/setuptools/command/install.py", line 96, 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 "/opt/oracle/sor/install/setuptools-0.6c11/setuptools/command/bdist_egg.py", line 236, in run
    dry_run=self.dry_run, mode=self.gen_header())
  File "/opt/oracle/sor/install/setuptools-0.6c11/setuptools/command/bdist_egg.py", line 527, in make_zipfile
    z = zipfile.ZipFile(zip_filename, mode, compression=compression)
  File "/usr/local/lib/python2.7/zipfile.py", line 681, in __init__
    "Compression requires the (missing) zlib module"

RuntimeError: Compression requires the (missing) zlib module

 
yum install zlib

yum install zlib-devel

安装完成后,重新编译 python2.7
不需要删除,只需要重新编译只需要make && make installl 安装就行了

 
然后重新安装setuptools:

cd setuptools-0.6c11

python setup.py install

python 安装 setuptools Compression requires the (missing) zlib module 的解决方案

标签:trace   name   ack   __init__   module   error   oracle   UI   lin   

原文地址:http://www.cnblogs.com/liang545621/p/7509764.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!