I am trying to install psycopg2 for use with Django. I am using virtualenv, and when I try to install psycopg2, I get an error:
In file included from psycopg/psycopgmodule.c:27: ./psycopg/psycopg.h:30:10: error: 'Python.h' file not found with <angled> include; use "quotes" instead #include <Python.h> ^~~~~~~~~~ "Python.h" In file included from psycopg/psycopgmodule.c:27: In file included from ./psycopg/psycopg.h:30: psycopg/Python.h:29:10: fatal error: 'structmember.h' file not found #include <structmember.h> ^ 2 errors generated. error: command 'clang' failed with exit status 1
I found several threads on the Internet that seemed to suggest that the solution to this problem is to install python-dev. Unfortunately, I found it only for apt-get and yum. As I know, it is not available for homegrown or maxport. Can someone help me figure out why the installation is not working or how can I get psycopg2? Thanks!
EDIT: I am using virtualenv and using the postgres application. I already have Xcode command line tools installed.
source share