简体   繁体   English

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

[英]can not install psycopg2 2.5+ on mac osx 10.9

Here is the error log: 这是错误日志:

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

Any suggestions? 有什么建议么? any workaround? 任何解决方法? I am entirely blocked by this for about a day. 我完全被这封了大约一天。

This one works for me: 这个对我有用:

export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments export CFLAGS = -Qunused-arguments export CPPFLAGS = -Qunused-arguments

clang error: unknown argument: '-mno-fused-madd' (python package installation failure) clang错误:未知参数:'-mno-fused-madd'(python包安装失败)

Try: 尝试:

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

Im pretty sure pyscopg2 doesnt support 9.3 yet. 我很确定pyscopg2还不支持9.3。 Here's the documentation http://initd.org/psycopg/docs/news.html 这是文档http://initd.org/psycopg/docs/news.html

I see references for 9.1 and 9.2 but nothing for 9.3 especially since it was just released a few months ago. 我看到9.1和9.2的参考文献,但没有9.3,特别是因为几个月前它刚刚发布。 9.3 incorporates it's own Foreign Writable wrapper which other modules like Multicorn now utilize. 9.3它包含了自己的外部可写包装器,其他模块如Multicorn现在使用它。

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

I could be wrong, just a possibility. 我错了,只是一种可能性。 Try using 9.2 and see if it works. 尝试使用9.2并查看它是否有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM