title: pip giving "ImportError: No module named setuptools" but I can import setuptools in python interpreter
body: <p>I'm getting setup on a new mac and I was humming along just fine, installing pip and a few packages. When suddenly, every pip command I'd try to run would throw</p>
  
  <pre><code>Exception:
  Traceback (most recent call last):
    File "/Library/Python/2.6/site-packages/pip-1.2.1-py2.6.egg/pip/basecommand.py", line 107, in main
      status = self.run(options, args)
    File "/Library/Python/2.6/site-packages/pip-1.2.1-py2.6.egg/pip/commands/install.py", line 248, in run
      import setuptools
  ImportError: No module named setuptools
  </code></pre>
  
  <p>I figured I had accidentally deleted a directory or something, so I tried reinstalling setuptools, following the advice of <a href="https://stackoverflow.com/a/4111811/625840">other answers</a> on this site. I downloaded the setuptools egg from <a href="http://pypi.python.org/pypi/setuptools#files" rel="nofollow noreferrer">here</a> and ran it like a shell script. Got this output:</p>
  
  <pre><code>Processing setuptools-0.6c11-py2.7.egg
  Removing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
  Copying setuptools-0.6c11-py2.7.egg to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
  setuptools 0.6c11 is already the active version in easy-install.pth
  Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.7/bin
  Installing easy_install-2.7 script to /Library/Frameworks/Python.framework/Versions/2.7/bin
  
  Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
  Processing dependencies for setuptools==0.6c11
  Finished processing dependencies for setuptools==0.6c11
  </code></pre>
  
  <p>Now, if I start an interactive python session, I can <code>import setuptools</code> without error, but pip (and other command line scripts) complain that it's not installed. Any ideas why Python seems to be finding it, but not other scripts?</p>
  
  <p>If it helps, this is what's in <code>sys.path</code>:</p>
  
  <pre><code>/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
  </code></pre>