title: When I attempt to runserver, why do I get an ImportError Reason: image not found?
body: <p>I upgraded from osX 10.7 to 10.9 and all my PostgreSQL database calls started failing.    </p>
  
  <p>I upgraded to psycopg2 version 2.5.2  via<br>
  $ sudo pip install --upgrade psycopg2    </p>
  
  <p>When I try to runserver, I get an importError.    </p>
  
  <pre><code>$ python manage.py runserver    
      ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: /usr/local/lib/libpq.5.4.dylib  
        Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so  
        Reason: image not found
  </code></pre>
  
  <p>What does this mean?<br>
  It seems that Python is attempting to load:
   /usr/local/lib/libpq.5.4.dylib</p>
  
  <p>But the file is not there, how do I correct this?</p>
  
  <p>HOW I FIXED IT:<br>
  It seems postgreSQL was looking for a file in the wrong location.</p>
  
  <p>So, I installed PostgreSQL 9.3 from a binary.
  I think created a symbolic link to the *.dynlib file.</p>
  
  <p>ln -s /Library/PostgreSQL/9.3/lib/libpq.5.6.dylib /usr/local/lib/libpq.5.4.dylib</p>