我一直在尋找解決方案,但我似乎遇到了一個罕見的錯誤,同時試圖將psycopg2安裝在Flask應用程序的virtualenv上。我運行此命令:使用Flask/Postgres安裝psycopg2
pip install http://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.4.tar.gz
這是錯誤:
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.4 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090104 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/Applications/Postgres.app/Contents/MacOS/include -I/Applications/Postgres.app/Contents/MacOS/include/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
---------------------------------------- Command /Users/jasdeep1/Dropbox/workspace/Printbase/venv/bin/python -c "import setuptools;file='/var/folders/9q/bg9_hgr16s7gt7gdbg8x79wr0000gn/T/pip-TbS4xF-build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/9q/bg9_hgr16s7gt7gdbg8x79wr0000gn/T/pip-Yavgs4-record/install-record.txt --single-version-externally-managed --install-headers /Users/jasdeep1/Dropbox/workspace/Printbase/venv/include/site/python2.7 failed with error code 1 in /var/folders/9q/bg9_hgr16s7gt7gdbg8x79wr0000gn/T/pip-TbS4xF-build Storing complete log in /Users/jasdeep1/.pip/pip.log
不完全知道如何解決這一點。我見過的答案似乎沒有解決這個問題。任何幫助邁向正確的方向表示讚賞。
樂於分享更多的調試輸出,但不知道多少細節是太多的細節。
嘗試解決這個問題,你的差不多 - http://stackoverflow.com/questions/22313407 – vivekagr
[鐺錯誤的可能重複:未知的說法:「-mno融合-MADD」(蟒蛇包安裝失敗)](http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa) –