title: "No module named zlib" error anytime I use pip
body: <p>I'm using terminal on mac, and anytime I attempt to use pip, I get the following error message telling me that it cannot find a module named zlib:</p>
  
  <hr>
  
  <pre><code>$ pip --version
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/__init__.py", line 27, in &lt;module&gt;
      from . import urllib3
    File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 8, in &lt;module&gt;
      from .connectionpool import (
    File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 42, in &lt;module&gt;
      from .response import HTTPResponse
    File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 3, in &lt;module&gt;
      import zlib
  ModuleNotFoundError: No module named 'zlib'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.5/bin/pip", line 7, in &lt;module&gt;
      from pip import main
    File "/usr/local/lib/python3.6/site-packages/pip/__init__.py", line 21, in &lt;module&gt;
      from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
    File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/__init__.py", line 62, in &lt;module&gt;
      from .packages.urllib3.exceptions import DependencyWarning
    File "/usr/local/lib/python3.6/site-packages/pip/_vendor/requests/packages/__init__.py", line 29, in &lt;module&gt;
      import urllib3
    File "/usr/local/lib/python3.6/site-packages/urllib3/__init__.py", line 8, in &lt;module&gt;
      from .connectionpool import (
    File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 36, in &lt;module&gt;
      from .response import HTTPResponse
    File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 3, in &lt;module&gt;
      import zlib
  
  ModuleNotFoundError: No module named 'zlib'
  </code></pre>
  
  <hr>
  
  <p>I've read several SO posts with the same error message, and have tried their solutions, including attempting to install zlib using homebrew, which fails, and updating my Xcode developer tools. I also installed pip earlier using <code>python get-pip.py</code>, and it said it installed successfully. </p>
  
  <p>The reason I need pip is to install a package for use on python 2.7, but doing <code>$ pip install "package-name"</code> produces the same error as above. I have both Python 2 and 3 installed on my machine, if that helps. I'm kind of new to pip and using the command line in general, and I'm super confused; if anyone could help me out I'd really appreciate it.</p>