title: Pip installing to wrong virtual environment
body: <p>I have two Django projects each with a virtual environment called <code>myvenv</code>. I am trying to use pip to install a package called psycopg2. It is installing to the wrong virtual environment even though the <code>which pip</code> command confirms that pip is being run within the correct virtual environment.</p>
  
  <p>I rebooted my mac so as to start without any virtual environments running. My terminal log looks like this when I try to use pip:</p>
  
  <pre><code>BillMacBookPro:~ billnoble$ cd ~/documents/yhistory-server
  BillMacBookPro:yhistory-server billnoble$ source ~/documents/yhistory-    server/myvenv/bin/activate
  (myvenv) BillMacBookPro:yhistory-server billnoble$ which pip
  /Users/billnoble/Documents/YHistory-Server/myvenv/bin/pip
  (myvenv) BillMacBookPro:yhistory-server billnoble$ brew install postgresql
  Warning: postgresql-9.4.4 already installed
  Warning: You are using OS X 10.11.
  We do not provide support for this pre-release version.
  You may encounter build failures or other breakage.
  (myvenv) BillMacBookPro:yhistory-server billnoble$ pip install psycopg2
  Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /Users/billnoble/Documents/VeeUServer/myvenv/lib/python3.4/site-packages
  You are using pip version 8.1.1, however version 8.1.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  </code></pre>
  
  <p>I am successfully starting my virtual environment in the YHistory-Server directory and <code>which pip</code> confirms that it is running from this virtual server. However when I run pip it complains that the package is installed in another virtual environment on my computer. Why is it using the wrong path name? How can I make it install in the correct virtual environment?</p>