title: Python email module ImportError: No module named utils
body: <p>My installation of Python's <a href="http://www.python-requests.org/en/latest/">requests</a> library has been working perfectly for months and it has decided to break today.</p>
  
  <pre><code>Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
  [GCC 4.8.2] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import requests
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 58, in &lt;module&gt;
      from . import utils
    File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 26, in &lt;module&gt;
      from .compat import parse_http_list as _parse_list_header
    File "/usr/local/lib/python2.7/dist-packages/requests/compat.py", line 7, in &lt;module&gt;
      from .packages import chardet
    File "/usr/local/lib/python2.7/dist-packages/requests/packages/__init__.py", line 3, in &lt;module&gt;
      from . import urllib3
    File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/__init__.py", line 10, in &lt;module&gt;
      from .connectionpool import (
    File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 37, in &lt;module&gt;
      from .request import RequestMethods
    File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/request.py", line 6, in &lt;module&gt;
      from .filepost import encode_multipart_formdata
    File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/filepost.py", line 8, in &lt;module&gt;
      from .fields import RequestField
    File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/fields.py", line 1, in &lt;module&gt;
      import email.utils
  ImportError: No module named utils
  </code></pre>
  
  <p>The trouble calling <a href="https://docs.python.org/2/library/email.util.html"><code>utils</code></a> is related to the <a href="https://docs.python.org/2/library/email-examples.html">email</a> module in Python 2.7</p>
  
  <pre><code>&gt;&gt;&gt; import email
  &gt;&gt;&gt; import email.utils
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: No module named utils
  </code></pre>
  
  <p><code>utils</code> is clearly a part of Python's <code>email</code> library, but it can't be accessed.  If I uninstall and reinstall:</p>
  
  <pre><code>$ sudo pip install email
  
  Collecting email
    Downloading email-4.0.2.tar.gz (1.2MB)
      100% |████████████████████████████████| 1.2MB 286kB/s 
  Installing collected packages: email
    Running setup.py install for email
  Successfully installed email-4.0.2
  </code></pre>
  
  <p><strong>Worst of all <code>utils.py</code> is actually present.  What am I doing wrong?</strong></p>
  
  <pre><code>$ ls /usr/local/lib/python2.7/dist-packages/email/
  base64mime.py   errors.py       header.py      message.py      parser.pyc
  base64mime.pyc  errors.pyc      header.pyc     message.pyc     quoprimime.py
  charset.py      feedparser.py   __init__.py    mime            quoprimime.pyc
  charset.pyc     feedparser.pyc  __init__.pyc   _parseaddr.py   test
  encoders.py     generator.py    iterators.py   _parseaddr.pyc  utils.py
  encoders.pyc    generator.pyc   iterators.pyc  parser.py       utils.pyc
  </code></pre>