1

After completing the installation of python djnago perfectly. When running a command

"python manage.py runserver"

getting an error like

raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'

1
  • 1
    Did you install psycopg2? Commented Apr 29, 2016 at 5:02

2 Answers 2

0

Did you install dev packages? assuming that you have already installed psycopg2 if not and if you are on ubuntu do this sudo apt-get install libpq-dev python-dev

Sign up to request clarification or add additional context in comments.

Comments

0

First Install its dependencies,

sudo apt-get build-dep python-psycopg2

Then install psycopg2 python module,

pip install psycopg2 

If it shows error then install this and try above ,

sudo apt-get install libpq-dev

Comments