Geodjango postgres

When you get the error:

 raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Users/michael/mac_virtualenvs/geodjango/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _lo_lseek64
  Referenced from: /Users/michael/mac_virtualenvs/geodjango/lib/python2.7/site-packages/psycopg2/_psycopg.so
  Expected in: /usr/lib/libpq.5.dylib
 in /Users/michael/mac_virtualenvs/geodjango/lib/python2.7/site-packages/psycopg2/_psycopg.so

You do:

ln -s /Library/PostgreSQL/9.4/lib/libpq.5.dylib /usr/local/lib

see: stackoverflow.com/questions/28515972/problems-using-psycopg2-on-mac-os-yosemite