title: Python and Postgres on Red Hat
body: <p>I've been having trouble installing psycopg2 on linux. I receive the following error when I try to import psycopg2.</p>
  
  <pre><code>Python 2.6.4 (r264:75706, Nov 19 2009, 14:52:22) 
  [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import psycopg2
  Traceback (most recent call last):
     File "&lt;stdin&gt;", line 1, in &lt;module&gt;
     File "/usr/local/lib/python2.6/site-packages/psycopg2/__init__.py", line 69, in &lt;module&gt;
     from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
  ImportError: /usr/local/lib/python2.6/site-packages/psycopg2/_psycopg.so: undefined symbol: PQserverVersion
  </code></pre>
  
  <p>I'm using Postgresql 9.0.1, Psycopg2 2.2.2, Python 2.6.4, and RHEL 4.</p>
  
  <p>The problem is identical to this question from a year ago, which was never answered: <a href="http://code.activestate.com/lists/python-list/169772/" rel="nofollow">http://code.activestate.com/lists/python-list/169772/</a>.</p>
  
  <p>Has anyone seen this error? Any suggestions would be much appreciated.</p>
  
  <p><strong>EDIT: This same combination of Postgresql 9.0.1, Psycopg2 2.2.2, and Python 2.6.4 worked fine on my mac (snow leopard). So I expect the problem is something particular to Red Hat.</strong></p>