[Fixed]-Error was: No module named postgresql.base ImproperlyConfigured 'django.db.backends.postgresql'

0👍

The problem is i have deleted the postgresql files in the my virtulenv’s lib/python/../django/db.. I created a new virtualenv and all postgres files were back. Excuse me for that!

1👍

It looks like you haven’t installed psycopg2

pip install psycopg2

Another possible reason is

Changed in Django 1.9:

The django.db.backends.postgresql backend is named
django.db.backends.postgresql_psycopg2 in older releases. For
backwards compatibility, the old name still works in newer versions.

https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-DATABASE-ENGINE

So you should change to use django.db.backends.postgresql

👤ittus

Leave a comment