2

I've installed psycopg2 on ubuntu:

sudo apt-get install python-psycopg2 

I also have python2.7 project. My version of psycopg2 is 2.4.5 which is compatible.

Version: 2.4.5-1build5
Provides: python2.7-psycopg2

But when I try to run the following command I get this error.

python manage.py syncdb

error:

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

My configuration in my pythonproject is right because it all worked on my local Windows. I don't know why it can't recognize or configure psycopg2.

>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named psycopg2
lvthillo
  • 28,263
  • 13
  • 94
  • 127

0 Answers0