Short Description
I am having a number of issues trying to connect a Django app (currently setup as SQLite3) to a newly created PostgreSQL on my Ubuntu Server.
The Question(s)
Can anyone share their success in doing this? Is there a good step-by-step tutorial on doing this? Or at least useful pointers on how to debug this?
Steps So Far (Background information)
1) I have installed PostgreSQL on my Ubuntu Server following this tutorial. Note that this produced Zero errors.
2) I configured my Django settings.py as seen below
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'mytestdb',
'USER': 'mux_user',
'PASSWORD': 'mux',
'HOST': '192.168.1.111',
'PORT': '',
}
}
3) Ran Django's 'syncdb'. This generated the following error.
django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg
4) Attempted to install psycopg with PIP, easy_install, and with the setup.py. All had the same failure of not being able to find the pg_config.
5) Google told me that I needed to install libpq-dev and python-dev in-order to compile the psycopg package. This is where I have lost most of my confidence in understanding what I am doing. I understand that these 2 packages are to allow me to compile python source, but is it really necessary to do this?
System Information
Client:
OS: OS X Snow Leopard-10.6.6
Django: Version 1.2.5
Python: 2.7 (running virtualenv)
Soon to be client
OS: Windows XP / 7
Running an bundled executable of the python environment above
Server:
OS: Ubuntu 10.10 (server, no gui)
PostgreSQL: 8.4 (that's what apt-get install downloaded)
Update
I did find in the documentation where it talks about needing to install psycopg. I suppose the question moves from do I really need this, to what is the best way to install psycopg on my clients.
Update 5-13-2011: 9:20AM
After speaking with a colleague, I believe this SO question addresses most of my issues