Python installation of setuptools compression requires the (missing) zlib module solution

Source: Internet
Author: User

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
Performance_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
Performance_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

After the installation is complete, recompile python2.7. [You do not need to delete it. You only need to re-compile, make, and install it]

######################################## ######################################## #################

Then reinstall setuptools:

CD setuptools-0.6c11

Python setup. py install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.