title: No module named 'pkg_resources'
body: <p>I tried to upgrade tensorflow with <code>pip install tensorflow --upgrade</code>. 
  During the uninstallation of the old version of <code>setuptools</code> some error occurred:</p>
  
  <pre><code>PermissionError: [Errno 13] Permission denied: '/Users/&lt;myName&gt;/anaconda/lib/python3.5/site-packages/easy-install.pth'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: '/Users/&lt;myName&gt;/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg'
  </code></pre>
  
  <p>Now, when using <code>pip</code>, I get the error that there is <code>No module named 'pkg_resources'</code>.</p>
  
  <p>I tried the solution in the thread <a href="https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources">No module named pkg_resources</a>:</p>
  
  <p>Using</p>
  
  <pre><code>curl https://bootstrap.pypa.io/ez_setup.py | python
  </code></pre>
  
  <p>again produced the following error (also when using <code>sudo curl</code>):</p>
  
  <pre><code>error: [Errno 13] Permission denied: '/Users/&lt;myName&gt;/anaconda/lib/python3.5/site-packages/easy-install.pth'
  </code></pre>
  
  <p>Trying to reinstall <code>setuptools</code> as was also suggested:</p>
  
  <pre><code>pip install --upgrade setuptools
  </code></pre>
  
  <p>results in the same <code>No module named 'pkg_resources'</code> error message. </p>
  
  <p>I am using MacOS 10.12.4</p>