无法在mac osx 10.9上安装psycopg2 2.5+

时间:2014-03-25 14:21:24

标签: python macos

以下是错误日志:

building 'psycopg2._psycopg' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/psycopg

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -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 -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090301 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/Library/PostgreSQL/9.3/include -I/Library/PostgreSQL/9.3/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-intel-2.7/psycopg/psycopgmodule.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

有什么建议吗?任何解决方法?我完全被这封了大约一天。

3 个答案:

答案 0 :(得分:7)

这个适用于我:

导出CFLAGS = -Qunused-arguments export CPPFLAGS = -Qunused-arguments

clang error: unknown argument: '-mno-fused-madd' (python package installation failure)

答案 1 :(得分:2)

尝试:

sudo ARCHFLAGS = -Wno-error = unused-command-line-argument-hard-error-in-future pip install psycopg2

答案 2 :(得分:1)

我很确定pyscopg2还不支持9.3。这是文档http://initd.org/psycopg/docs/news.html

我看到9.1和9.2的参考文献,但9.3没有,特别是因为几个月前它刚刚发布。 9.3它包含了自己的外部可写包装器,其他模块如Multicorn现在使用它。

http://www.postgresql.org/about/news/1481/

我可能错了,只是一种可能性。尝试使用9.2并查看它是否有效。

相关问题