title: Unsupported hash type error while installing hashlib using pip3
body: <p>I am trying to install the hashlib library for Python 3.6.0. Using pip3:</p>
  
  <pre><code>pip3 install hashlib
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Collecting hashlib
    Downloading hashlib-20081119.zip (42kB)
    100% |████████████████████████████████| 51kB 1.6MB/s
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 10, in &lt;module&gt;
          from setuptools.extern.six.moves import filter, filterfalse, map
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/extern/__init__.py", line 1, in &lt;module&gt;
          from pkg_resources.extern import VendorImporter
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 36, in &lt;module&gt;
          import email.parser
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/parser.py", line 12, in &lt;module&gt;
          from email.feedparser import FeedParser, BytesFeedParser
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/feedparser.py", line 27, in &lt;module&gt;
          from email._policybase import compat32
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/_policybase.py", line 9, in &lt;module&gt;
          from email.utils import _has_surrogates
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/utils.py", line 28, in &lt;module&gt;
          import random
        File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/random.py", line 46, in &lt;module&gt;
          from hashlib import sha512 as _sha512
        File "/private/var/folders/3m/q2pmrqbd2l9154yp_9ww5rjm0000gn/T/pip-build-1upkmzey/hashlib/hashlib.py", line 80
          raise ValueError, "unsupported hash type"
                          ^
      SyntaxError: invalid syntax
  
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3m/q2pmrqbd2l9154yp_9ww5rjm0000gn/T/pip-build-1upkmzey/hashlib/
  </code></pre>
  
  <p>Any idea on how to fix this? I am currently on macOS Sierra 10.12.6, using pip3 9.0.1 and python 3.6.</p>