You can tell clang to not raise this as an error by setting the following environment variables prior compilation:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Then pip install psycopg2
should work.
I had the same when trying to pip install lxml
.
Edit: if you are installing as superuser (which will likely be the case if you are trying to append to /Library/Python/2.7/site-packages
, the native Apple factory-installed Python distribution which ships with OS X, rather than to some other Python distribution which you have subsequently installed yourself), then you will need to do, as described by @Thijs Kuipers in comments below:
sudo -E pip install psycopg2
or the equivalent, for whatever other package name you may be substituting in place of psycopg2
.
UPDATE [2014-05-16]: Apple has fixed this problem with updated system Pythons (2.7, 2.6, and 2.5) in OS X 10.9.3
so the workaround is no longer necessary when using the latest Mavericks and Xcode 5.1+
. However, as of now, the workaround is still required for OS X 10.8.x
(Mountain Lion, currently 10.8.5) if you are using Xcode 5.1+
there.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…