You're missing: sudo apt-get install python-dev
On Thu, Oct 17, 2013 at 11:31 AM, Nigel Legg <[email protected]> wrote: > Thanks Thomas, that worked, so some progress, but now when I do sudo pip > psycopg2, I get an error: Python.h not found - > In file included from psycopg/psycopgmodule.c:27:0: > ./psycopg/psycopg.h:30:20: fatal error: Python.h: no such file or > directory. > Should I be downloading and building the source? > > Cheers, Nigel > 07914 740972 > > > > On 17 October 2013 09:57, Thomas Orozco <[email protected]> wrote: > >> You need the Postgres client C headers to build psycopg2. Before >> running pip install psycopg2, run: >> >> sudo apt-get install libpq-dev >> >> >> >> >> On Thu, Oct 17, 2013 at 10:51 AM, Nigel Legg <[email protected]>wrote: >> >>> I am not sure whether this is really a postgres issue or a python / >>> Django issue - please let me know if I should be posting this elsewhere. >>> I have installed Ubuntu 13.04, Postgres 9.1 and Django. (strangely, the >>> Ubuntu software centre says I have Python 3.3, but when I go into the >>> Python shell it says 2.7.4). >>> I followed the instructions on configuring Postgres from >>> http://blog.iiilx.com/programming/how-to-install-postgres-on-ubuntu-for-django/, >>> up to the point of adding a line to the pg_hba.conf file - Ubuntu would not >>> let me write to this. >>> When I tried to install psycopg2 (pip install psycopg2), I got the >>> following error: >>> >>> ERROR: you need to install postgresql-server-dev-X.Y for building a >>> server side extension or libpq-dev for building a client-side application. >>> >>> What does this mean? How do I proceed? >>> >>> Many thanks in advance for your help. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/django-users. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/3b3fa90f-7602-40ff-ab79-55d70c3074f1%40googlegroups.com >>> . >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAMuNovQyS1jhWLieeZ-Etb%2Bfpp1%2B6iaSRTuf5hNxVFJQpC4fWw%40mail.gmail.com >> . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CADeX7vwToyt8ze989WhUkmQ2nx0TwTqt8L7ibC3sHrGjZeRjBA%40mail.gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMuNovTGg84%2BLefLWV93CyDncbBpyzg0%2BvtnTgcsuo8M-fscuQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

