eriophora
eriophora

Reputation: 1049

Compiler errors when installing psycopg2 on OS X Yosemite

Command line tools are up to date, all other requirements are satisfied. I suspect this is some kind of compiler conflict, but I'm not certain. I'm not using a virtualenv.

pip install psycopg2

yields

gcc: error: x86_64: No such file or directory

gcc: error: unrecognized option '-arch'

error: command 'gcc' failed with exit status 1

The command is:

gcc -fno-strict-aliasing -I/Users/username/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.4 (dt dec pq3 ext)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DPG_VERSION_HEX=0x090305 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Users/username/anaconda/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.5_1/include -I/usr/local/Cellar/postgresql/9.3.5_1/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.5-x86_64-2.7/psycopg/psycopgmodule.o

Sidebar: I'm not certain why it's attempting to invoke anaconda, which I used to install Julia.

Upvotes: 0

Views: 128

Answers (1)

eriophora
eriophora

Reputation: 1049

This was resolved by removing the root directory for anaconda (with the conda info command). I'm still not clear on exactly why Anaconda produced those issues (would welcome information on this!), but at any rate the problem is fixed.

Upvotes: 1

Related Questions