title: How to undo a Python setuptools --prefix path blunder
body: <p>When I installed Python's <a href="http://pypi.python.org/pypi/setuptools" rel="nofollow"><code>setuptools</code></a> I absent mindedly tacked on a <code>--prefix</code> path I had been using on another machine:</p>
  
  <pre><code>sh setuptools-0.6c11-py2.7.egg --prefix=/opt/python2.7.2
  </code></pre>
  
  <p>Now after this blunder when I try to install <code>pip</code> I get the following error:</p>
  
  <pre>
  [root@kkdev src]# easy_install pip
  Searching for pip
  Best match: pip 1.0.2
  Processing pip-1.0.2-py2.7.egg
  pip 1.0.2 is already the active version in easy-install.pth
  Installing pip script to /usr/bin
  error: /usr/bin/pip: No such file or directory
  </pre>
  
  <p>What's happening is that a symbolic link is being created that points to the folder I specified in the <code>--prefix</code> path:</p>
  
  <pre>
  [root@kkdev src]# ls -al /usr/bin/pip
  lrwxrwxrwx 1 root root 24 Nov  5 17:01 /usr/bin/pip -> /opt/python2.7.2/bin/pip
  </pre>
  
  <p>I deleted this link and then re-ran the setuptools installer and specified the correct prefix (my Python install lives in <code>/usr/lib/python2.7</code>):</p>
  
  <pre>
  sh setuptools-0.6c11-py2.7.egg --prefix=/usr
  </pre>
  
  <p>I then re-ran <code>easy_install pip</code> and it looked like I'd fixed my finger trouble. However when I went to install <code>virtualenv</code> I encountered the same problem:</p>
  
  <pre>
  [root@kkdev src]# pip install virtualenv
  
  [uninteresting installer dialogue snipped]
  
  Installing virtualenv script to /usr/bin
  
  error: /usr/bin/virtualenv: No such file or directory
  </pre>
  
  <p>Again the wrong path is being used to create the symbolic link to where <code>virtualenv</code> is installed:</p>
  
  <pre>
  [root@kkdev src]# ls -al /usr/bin/virtualenv
  lrwxrwxrwx 1 root root 31 Nov  5 17:01 /usr/bin/virtualenv -> /opt/python2.7.2/bin/virtualenv
  </pre>
  
  <p>(I'm running Fedora 15 32bit which has Python 2.7.1 installed out of the box)</p>
  
  <p>How do I fix this permanently?</p>