title: gcc-4.2 error when using pip in virtualenv on OSX 10.7
body: <p>I am trying to install psycopg2 in virtualenv enviroment and am having a heck of a time.  I think I may have screwed something up because I installed virtualenv and then upgraded to Xcode 4. </p>
  
  <pre><code>(my_enviroment)my_users-macbook-2:my_enviroment my_user$ pip install psycopg2
  </code></pre>
  
  <p>Produces this message:</p>
  
  <pre><code>Downloading/unpacking psycopg2==2.4.2
    Running setup.py egg_info for package psycopg2
  
      no previously-included directories found matching 'doc/src/_build'
  Installing collected packages: psycopg2
    Running setup.py install for psycopg2
      building 'psycopg2._psycopg' extension
      gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.2 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090004 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/include -I/usr/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.6-intel-2.7/psycopg/psycopgmodule.o
      unable to execute gcc-4.2: No such file or directory
      error: command 'gcc-4.2' failed with exit status 1
      Complete output from command /Users/my_user/my_enviroment/bin/python -c "import setuptools;__file__='/Users/my_user/my_enviroment/build/psycopg2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/b8/jflj9btd4rzb80xfmcy_rk140000gn/T/pip-lojVKc-record/install-record.txt --install-headers /Users/my_user/my_enviroment/bin/../include/site/python2.7:
      running install
  
  running build
  
  running build_py
  
  running build_ext
  
  building 'psycopg2._psycopg' extension
  
  gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.2 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090004 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/include -I/usr/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.6-intel-2.7/psycopg/psycopgmodule.o
  
  unable to execute gcc-4.2: No such file or directory
  
  error: command 'gcc-4.2' failed with exit status 1
  
  ----------------------------------------
  Command /Users/my_user/my_enviroment/bin/python -c "import setuptools;__file__='/Users/my_user/my_enviroment/build/psycopg2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/b8/jflj9btd4rzb80xfmcy_rk140000gn/T/pip-lojVKc-record/install-record.txt --install-headers /Users/my_user/my_enviroment/bin/../include/site/python2.7 failed with error code 1
  Storing complete log in /Users/my_user/.pip/pip.log
  </code></pre>
  
  <p>I am running OSX 10.7, Python 2.7.2, pip 1.0.2, Xcode 4.</p>
  
  <p>I have tried the following solutions, with no success:</p>
  
  <p><a href="https://stackoverflow.com/questions/5427157/cannot-install-psycopg2-on-osx-10-6-7-with-xcode4">Cannot install psycopg2 on OSX 10.6.7 with XCode4</a></p>
  
  <p><a href="https://stackoverflow.com/questions/7883372/gcc-error-command-gcc-4-0-failed-with-exit-status-1">GCC error: command &#39;gcc-4.0&#39; failed with exit status 1</a></p>
  
  <p>Any thoughts? What other information would you need to know?</p>