I'm trying to do this:
python3.3 manage.py runserver
In my Django project folder. I get this error message:
File "/usr/local/lib/python3.3/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 25, in <module>
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'
My settings in settings.py are the following:
DATABASES = {
'default': {
'ENGINE':'django.db.backends.postgresql_psycopg2',
'NAME': 'test_databas',
'USER': 'postgre',
'PASSWORD': 'mypassword',
'HOST': 'localhost',
'PORT': '5432',
}
}
I have already downloaded psycopg2 with Python3.3. The file /usr/local/lib/python3.3/site-packages/django/db/backends/postgresql_psycopg2/base.py also exists. However, Python doesn't think I have a module named psycopg2. I have tried this:
$ python3.3
Python 3.3.3 (default, Feb 2 2014, 14:32:49)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'psycopg2'
>>>
I have also changed my sys.path as suggested here.
I'm new to this and would be very grateful for some help.