I've been stuck on this problem for the past few days, which is preventing me from getting my local environment set up properly. Here's my setup:
However, whenever I spin up my Apache server and navigate to my local URL, I'm greeted with this ugly error:
dlopen({....}/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2):
Symbol not found: _PyMemoryView_Type
Referenced from: {....}/lib/python2.7/site-packages/psycopg2/_psycopg.so
Expected in: flat namespace in {....}/lib/python2.7/site-packages/psycopg2/_psycopg.so
Here are the results when I install psycopg2:
Downloading/unpacking psycopg2
Downloading psycopg2-2.4.5.tar.gz (719Kb): 719Kb downloaded
Running setup.py egg_info for package psycopg2
no previously-included directories found matching 'doc/src/_build'
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/psycopgmodule.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/green.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/green.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/pqpath.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/pqpath.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/utils.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/utils.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/bytes_format.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/bytes_format.o
In file included from psycopg/bytes_format.c:81:
In file included from ./psycopg/psycopg.h:33:
./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
static void Dprintf(const char *fmt, ...) {}
^
1 warning generated.
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/connection_int.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/connection_int.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/connection_type.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/connection_type.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/cursor_int.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/cursor_int.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/cursor_type.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/cursor_type.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/lobject_int.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/lobject_int.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/lobject_type.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/lobject_type.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/notify_type.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/notify_type.o
In file included from psycopg/notify_type.c:27:
In file included from ./psycopg/psycopg.h:33:
./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
static void Dprintf(const char *fmt, ...) {}
^
1 warning generated.
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/xid_type.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/xid_type.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_asis.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_asis.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_binary.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_binary.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_datetime.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_datetime.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_list.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_list.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_pboolean.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pboolean.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_pdecimal.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pdecimal.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_pint.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pint.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_pfloat.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pfloat.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/adapter_qstring.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_qstring.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/microprotocols.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/microprotocols.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/microprotocols_proto.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/microprotocols_proto.o
In file included from psycopg/microprotocols_proto.c:27:
In file included from ./psycopg/psycopg.h:33:
./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
static void Dprintf(const char *fmt, ...) {}
^
1 warning generated.
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.1.4/include -I/usr/local/Cellar/postgresql/9.1.4/include/server -c psycopg/typecast.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/typecast.o
In file included from psycopg/typecast.c:179:
./psycopg/typecast_array.c:227:31: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (--stack_index < 0)
~~~~~~~~~~~~~ ^ ~
1 warning generated.
/usr/bin/clang -bundle -undefined dynamic_lookup -L/usr/local/Cellar/readline/6.2.4/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib -L/opt/X11/lib -arch x86_64 build/temp.macosx-10.8-x86_64-2.7/psycopg/psycopgmodule.o build/temp.macosx-10.8-x86_64-2.7/psycopg/green.o build/temp.macosx-10.8-x86_64-2.7/psycopg/pqpath.o build/temp.macosx-10.8-x86_64-2.7/psycopg/utils.o build/temp.macosx-10.8-x86_64-2.7/psycopg/bytes_format.o build/temp.macosx-10.8-x86_64-2.7/psycopg/connection_int.o build/temp.macosx-10.8-x86_64-2.7/psycopg/connection_type.o build/temp.macosx-10.8-x86_64-2.7/psycopg/cursor_int.o build/temp.macosx-10.8-x86_64-2.7/psycopg/cursor_type.o build/temp.macosx-10.8-x86_64-2.7/psycopg/lobject_int.o build/temp.macosx-10.8-x86_64-2.7/psycopg/lobject_type.o build/temp.macosx-10.8-x86_64-2.7/psycopg/notify_type.o build/temp.macosx-10.8-x86_64-2.7/psycopg/xid_type.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_asis.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_binary.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_datetime.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_list.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pboolean.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pdecimal.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pint.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_pfloat.o build/temp.macosx-10.8-x86_64-2.7/psycopg/adapter_qstring.o build/temp.macosx-10.8-x86_64-2.7/psycopg/microprotocols.o build/temp.macosx-10.8-x86_64-2.7/psycopg/microprotocols_proto.o build/temp.macosx-10.8-x86_64-2.7/psycopg/typecast.o -L/usr/local/Cellar/postgresql/9.1.4/lib -lpq -lssl -lcrypto -o build/lib.macosx-10.8-x86_64-2.7/psycopg2/_psycopg.so
no previously-included directories found matching 'doc/src/_build'
Successfully installed psycopg2
Any ideas on what could be causing this? I'm stumped and am in desperate need of some help. Thanks in advance. Let me know if any more info would be helpful.
Here is my vhost file for Apache:
NameVirtualHost *:80
<VirtualHost mysite.local:80>
ServerName mysite.local
Alias /assets/ {...}/app/webapp/assets/
Alias /static/ {...}/lib/python2.7/site-packages/django/contrib/admin/static/
Alias /robots.txt {...}/app/webapp/assets/robots.txt
Alias /favicon.ico {...}/app/webapp/assets/favicon.ico
CustomLog "{...}/logs/apache-access.log" combined
ErrorLog "{...}/logs/apache-error.log"
LogLevel warn
WSGIDaemonProcess mysite.local processes=1 threads=1 maximum-requests=1 python-path={...}/lib/python2.7/site-packages python-eggs={...}/lib/python2.7/site-packages
WSGIProcessGroup mysite.local
WSGIScriptAlias / {...}/conf/apache/django.wsgi
WSGIPassAuthorization On
<Directory {...}/app/webapp/assets>
Order deny,allow
Allow from all
Options -Indexes FollowSymLinks
</Directory>
<Directory {...}/conf/apache>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Here is my django.wsgi file:
import os, sys
import django.core.handlers.wsgi
import site
sys.path.append('{...}/lib/python2.7/site-packages')
sys.path.append('{...}/app')
sys.path.append('{...}/app/webapp')
sys.path.append('{...}/app/webapp/apps')
os.environ['DJANGO_SETTINGS_MODULE'] = 'webapp.settings.production'
site.addsitedir('{...}/lib/python2.7/site-packages')
application = django.core.handlers.wsgi.WSGIHandler()
After a day of dancing around with files and settings, I finally figured it out. Largely thanks to @BigHandsome for steering me in the right direction. In my Apache httpd.conf file, I was using the mod_wsgi.so that came with OS X 10.8. Apparently this was the problem. I fixed it by doing the following:
brew install mod_wsgi
)brew install mod_wsgi
and it worked.LoadModule wsgi_module /usr/local/Cellar/mod_wsgi/3.3/libexec/mod_wsgi.so
apachectl restart
) and voila!