title: 'error: Error -5 while decompressing data: incomplete or truncated stream' when installing pip package
body: <p>I'm having the following error when running <code>pip install Pillow==2.9.0</code> in a virtualenv: <code>error: Error -5 while decompressing data: incomplete or truncated stream</code></p>
  
  <p>Other packages install/uninstall fine, it just seems to affects Pillow 2.9.0. It doesn't seem to matter what virtualenv I'm in (or not).</p>
  
  <p>Downloading a source tarball and installing from that worked, but since this is on a build server that's not an ideal workaround as I want to rely on <code>pip install -r requirements.txt</code></p>
  
  <p>Versions:</p>
  
  <ul>
  <li><code>pip --version</code>: <code>pip 7.1.0 from /usr/local/lib/python2.7/site-packages (python 2.7)</code></li>
  <li><code>python --version</code>: <code>Python 2.7.10</code></li>
  </ul>
  
  <p>The full traceback is:</p>
  
  <pre><code>Collecting Pillow==2.9.0
  /mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
  Exception:
  Traceback (most recent call last):
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
      status = self.run(options, args)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/commands/install.py", line 282, in run
      requirement_set.prepare_files(finder)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files
      functools.partial(self._prepare_file, finder))
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
      more_reqs = handler(req_to_install)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 491, in _prepare_file
      session=self.session)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/download.py", line 825, in unpack_url
      session,
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/download.py", line 673, in unpack_http_url
      from_path, content_type = _download_http_url(link, session, temp_dir)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/download.py", line 857, in _download_http_url
      stream=True,
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 477, in get
      return self.request('GET', url, **kwargs)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/download.py", line 373, in request
      return super(PipSession, self).request(method, url, *args, **kwargs)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 465, in request
      resp = self.send(prep, **send_kwargs)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 573, in send
      r = adapter.send(request, **kwargs)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 36, in send
      cached_response = self.controller.cached_request(request)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 102, in cached_request
      resp = self.serializer.loads(request, self.cache.get(cache_url))
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 108, in loads
      return getattr(self, "_loads_v{0}".format(ver))(request, data)
    File "/mnt/jenkins/jobA/workspace/.pyenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 164, in _loads_v2
      cached = json.loads(zlib.decompress(data).decode("utf8"))
  error: Error -5 while decompressing data: incomplete or truncated stream
  </code></pre>