I get the following error when I try to install psycopg2
building ‘psycopg2._psycopg’ extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe
-fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=”2.4.5 (dt dec pq3 ext)” -DPG_VERSION_HEX=0x090104 -DPSYCOPG_EXTENSIONS=1
-DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-I. -I/usr/include -I/usr/include/postgresql/server -c psycopg/psycopgmodule.c -o
build/temp.macosx-10.8-intel-2.7/psycopg/psycopgmodule.ounable to execute clang: No such file or directory
error: command ‘clang’ failed with exit status 1
How do I fix this?
From the error message, you are missing the clang package in order to compile psycopg2.
From the tags on the question, I take you’re on osx, perhaps the following link will help you getting and installing it:
http://woss.name/2012/01/24/how-to-install-a-working-set-of-compilers-on-mac-os-x-10-7-lion/