Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to install pip or setup tools form python 3.2 in debian 6.

First case:

apt-get install python3-pip...OK

python3 webob

Searching for webob
Best match: WebOb 1.2.2
Traceback (most recent call last):
  File "", line 5, in <module>
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 1931, in main
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 1912, in with_ei_usage
    return f()
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 1935, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/local/lib/python3.2/distutils/", line 148, in setup
  File "/usr/local/lib/python3.2/distutils/", line 917, in run_commands
  File "/usr/local/lib/python3.2/distutils/", line 936, in run_command
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 368, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 608, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 638, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 799, in install_eggs
    unpack_archive(dist_filename, tmpdir, self.unpack_progress)
  File "/usr/lib/python3/dist-packages/setuptools/", line 67, in unpack_archive
    driver(filename, extract_dir, progress_filter)
  File "/usr/lib/python3/dist-packages/setuptools/", line 154, in unpack_zipfile
    data =
  File "/usr/local/lib/python3.2/", line 891, in read
    with, "r", pwd) as fp:
  File "/usr/local/lib/python3.2/", line 980, in open
    close_fileobj=not self._filePassed)
  File "/usr/local/lib/python3.2/", line 489, in __init__
    self._decompressor = zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'

Second case: from


Extracting in /tmp/tmpv6iei2
Traceback (most recent call last):
  File "", line 515, in <module>
  File "", line 511, in main
    _install(tarball, _build_install_args(argv))
  File "", line 73, in _install
    tar =
  File "/usr/local/lib/python3.2/", line 1746, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

Third case: from tar -xzvf distribute-0.6.28.tar.gz cd distribute-0.6.28 python3 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 ''
writing manifest file 'distribute.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying distribute.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/distribute-0.6.28-py3.2.egg' and adding 'build/bdist.linux-x86_64/egg' to it
Traceback (most recent call last):
  File "", line 220, in <module>
    scripts = scripts,
  File "/usr/local/lib/python3.2/distutils/", line 148, in setup
  File "/usr/local/lib/python3.2/distutils/", line 917, in run_commands
  File "/usr/local/lib/python3.2/distutils/", line 936, in run_command
  File "build/src/setuptools/command/", line 73, in run
  File "build/src/setuptools/command/", line 93, in do_egg_install
  File "/usr/local/lib/python3.2/distutils/", line 313, in run_command
  File "/usr/local/lib/python3.2/distutils/", line 936, in run_command
  File "build/src/setuptools/command/", line 241, in run
    dry_run=self.dry_run, mode=self.gen_header())
  File "build/src/setuptools/command/", line 542, in make_zipfile
    z = zipfile.ZipFile(zip_filename, mode, compression=compression)
  File "/usr/local/lib/python3.2/", line 689, in __init__
    "Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module

zlib1g-dev installed

Help me please

share|improve this question

1 Answer 1

Did you install zlib1g-dev after your Python was installed? If zlib was not available when Python was installed, it would have been left out. You can confirm by opening a Python shell and attempting to import zlib, which I expect will fail. If you're sure zlib1g-dev is installed, re-install Python.

share|improve this answer
I have reinstall Python from official site ( ) and import zlib fails –  atomAltera Sep 6 '12 at 15:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.