2

I would like to use the PostGreSQL database with Django. I first installed the driver psycopg2 with pip and virtualenv:

$ PATH=$PATH:/Library/PostgreSQL/9.3/bin/
$ pip install psycopg2
[...]
  Successfully installed psycopg2
  Cleaning up...
$

I have done the following configuration in Django:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'my_db',
        'USER': 'django',
        'PASSWORD': 'xx',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

But when I try to create the schema with syncdb I have the following error:

$ python manage.py syncdb
  raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
  django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: dlopen([...]/Code/env/dev/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: libssl.1.0.0.dylib
  Referenced from: [...]Code/env/dev/lib/python2.7/site-packages/psycopg2/_psycopg.so
  Reason: image not found

Do you know why the libssl is not loaded and how can I fix this issue?

Thank you

Julio
  • 2,493
  • 4
  • 33
  • 53
  • 1
    Found the solution thanks to Purrell post: http://stackoverflow.com/a/12397173/1630586 – Julio Jun 22 '14 at 12:19
  • possible duplicate of [python pip install psycopg2 install error](http://stackoverflow.com/questions/11538249/python-pip-install-psycopg2-install-error) – Selcuk Jun 22 '14 at 18:28

0 Answers0