簡體   English   中英

Psycopg2錯誤:叮當聲:錯誤:未知參數:'-mno-fused-madd'[-Wunused命令行參數參數硬錯誤在將來]

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

試圖以多種方式安裝psycopg2,但我不斷收到與此類似的錯誤:

$ pip install psycopg2
    Downloading/unpacking psycopg2
      Downloading psycopg2-2.5.4.tar.gz (682kB): 682kB downloaded
      Running setup.py (path:/private/var/folders/6p/0z5pjhdn47b7r2x0c4fjy3tw0000gp/T/pip_build_nir/psycopg2/setup.py) egg_info for package psycopg2

    Installing collected packages: psycopg2
      Running setup.py install for psycopg2
        building 'psycopg2._psycopg' extension
        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.4 (dt dec pq3 ext)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DPG_VERSION_HEX=0x090304 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.4/include -I/usr/local/Cellar/postgresql/9.3.4/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
        Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/6p/0z5pjhdn47b7r2x0c4fjy3tw0000gp/T/pip_build_nir/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/6p/0z5pjhdn47b7r2x0c4fjy3tw0000gp/T/pip-igitig-record/install-record.txt --single-version-externally-managed --compile:
        running install

    running build

    running build_py

    creating build

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

    creating build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/__init__.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/_json.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/_range.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/errorcodes.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/extensions.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/extras.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/pool.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/psycopg1.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    copying lib/tz.py -> build/lib.macosx-10.9-intel-2.7/psycopg2

    creating build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/dbapi20.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/dbapi20_tpc.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_async.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_bug_gc.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_bugX000.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_cancel.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_connection.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_copy.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_cursor.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_dates.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_extras_dictcursor.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_green.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_lobject.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_module.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_notify.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_psycopg2_dbapi20.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_quote.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_transaction.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_types_basic.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_types_extras.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/test_with.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/testconfig.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    copying tests/testutils.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests

    running build_ext

    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.4 (dt dec pq3 ext)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DPG_VERSION_HEX=0x090304 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.4/include -I/usr/local/Cellar/postgresql/9.3.4/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

    ----------------------------------------
    Cleaning up...
    Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/6p/0z5pjhdn47b7r2x0c4fjy3tw0000gp/T/pip_build_nir/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/6p/0z5pjhdn47b7r2x0c4fjy3tw0000gp/T/pip-igitig-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/6p/0z5pjhdn47b7r2x0c4fjy3tw0000gp/T/pip_build_nir/psycopg2
    Storing debug log for failure in /Users/nir/Library/Logs/pip.log

我嘗試了許多命令,包括重新安裝postgresql和django-toolbelt。 似乎沒有什么改變,會發生相同的錯誤“類型”。 我還將postgresql包含在$ PATH中,包括: export PYTHONPATH=$PYTHONPATH:/Library/PostgreSQL/9.3/bin/pg_config

我在OSX Maverick上。 我正在運行python 2.7和Django 1.6。

有任何想法嗎?

我實際上不知道答案,但是,當我使用遇到問題的所有組件時,我進行了一些搜索。 我遇到了這個:

http://kaspermunck.github.io/2014/03/fixing-clang-error/

因此,您可以嘗試執行以下操作:

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

似乎問題在於cc命令行包含的參數對於cc而言沒有意義,它曾經是一個軟錯誤,但現在是致命錯誤。 祝好運!

-G

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM