为python 3安装psycopg2

时间:2016-10-27 04:04:04

标签: python pip psycopg2

我在使用pip在我的Mac上安装psycopg2时遇到问题。

pip3 install psycopg2
sudo pip3 install psycopg2
pip install flask-sqlalchemy psycopg2
sudo easy_install psycopg2

我已经尝试了所有可以找到的解决方案,但每次我都遇到同样的错误:

Collecting psycopg2
Using cached psycopg2-2.6.2.tar.gz
Installing collected packages: psycopg2
  Running setup.py install for psycopg2 ... error
    Complete output from command /usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mn/t5nqmwlj5wb99lyzrkq_d0qc0000gn/T/pip-build-darwcjmh/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/mn/t5nqmwlj5wb99lyzrkq_d0qc0000gn/T/pip-eqwp14v4-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-intel-3.5
    creating build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/__init__.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/_json.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/_range.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/errorcodes.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/extensions.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/extras.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/pool.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/psycopg1.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    copying lib/tz.py -> build/lib.macosx-10.6-intel-3.5/psycopg2
    creating build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/__init__.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/dbapi20.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/dbapi20_tpc.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_async.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_bug_gc.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_bugX000.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_cancel.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_connection.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_copy.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_cursor.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_dates.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_errcodes.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_extras_dictcursor.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_green.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_lobject.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_module.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_notify.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_psycopg2_dbapi20.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_quote.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_transaction.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_types_basic.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_types_extras.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/test_with.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/testconfig.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    copying tests/testutils.py -> build/lib.macosx-10.6-intel-3.5/psycopg2/tests
    Skipping optional fixer: buffer
    Skipping optional fixer: idioms
    Skipping optional fixer: set_literal
    Skipping optional fixer: ws_comma
    running build_ext
    building 'psycopg2._psycopg' extension
    creating build/temp.macosx-10.6-intel-3.5
    creating build/temp.macosx-10.6-intel-3.5/psycopg
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.6-intel-3.5/psycopg/psycopgmodule.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/green.c -o build/temp.macosx-10.6-intel-3.5/psycopg/green.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/pqpath.c -o build/temp.macosx-10.6-intel-3.5/psycopg/pqpath.o
    psycopg/pqpath.c:198:17: warning: implicit conversion from enumeration type 'ConnStatusType' to different enumeration type 'ExecStatusType' [-Wenum-conversion]
                    PQstatus(conn->pgconn) : PQresultStatus(*pgres)));
                    ^~~~~~~~~~~~~~~~~~~~~~
    psycopg/pqpath.c:1628:17: warning: implicit conversion from enumeration type 'ConnStatusType' to different enumeration type 'ExecStatusType' [-Wenum-conversion]
                    PQstatus(curs->conn->pgconn) : PQresultStatus(curs->pgres)));
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 warnings generated.
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/utils.c -o build/temp.macosx-10.6-intel-3.5/psycopg/utils.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/bytes_format.c -o build/temp.macosx-10.6-intel-3.5/psycopg/bytes_format.o
    In file included from psycopg/bytes_format.c:81:
    In file included from ./psycopg/psycopg.h:33:
    ./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
    static void Dprintf(const char *fmt, ...) {}
                ^
    1 warning generated.
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/connection_int.c -o build/temp.macosx-10.6-intel-3.5/psycopg/connection_int.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/connection_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/connection_type.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/cursor_int.c -o build/temp.macosx-10.6-intel-3.5/psycopg/cursor_int.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/cursor_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/cursor_type.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/diagnostics_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/diagnostics_type.o
    In file included from psycopg/diagnostics_type.c:27:
    In file included from ./psycopg/psycopg.h:33:
    ./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
    static void Dprintf(const char *fmt, ...) {}
                ^
    1 warning generated.
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/error_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/error_type.o
    In file included from psycopg/error_type.c:27:
    In file included from ./psycopg/psycopg.h:33:
    ./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
    static void Dprintf(const char *fmt, ...) {}
                ^
    1 warning generated.
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/lobject_int.c -o build/temp.macosx-10.6-intel-3.5/psycopg/lobject_int.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/lobject_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/lobject_type.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/notify_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/notify_type.o
    In file included from psycopg/notify_type.c:27:
    In file included from ./psycopg/psycopg.h:33:
    ./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
    static void Dprintf(const char *fmt, ...) {}
                ^
    1 warning generated.
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/xid_type.c -o build/temp.macosx-10.6-intel-3.5/psycopg/xid_type.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_asis.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_asis.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_binary.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_binary.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_datetime.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_datetime.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_list.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_list.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_pboolean.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pboolean.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_pdecimal.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pdecimal.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_pint.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pint.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_pfloat.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pfloat.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/adapter_qstring.c -o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_qstring.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/microprotocols.c -o build/temp.macosx-10.6-intel-3.5/psycopg/microprotocols.o
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/microprotocols_proto.c -o build/temp.macosx-10.6-intel-3.5/psycopg/microprotocols_proto.o
    In file included from psycopg/microprotocols_proto.c:27:
    In file included from ./psycopg/psycopg.h:33:
    ./psycopg/config.h:71:13: warning: unused function 'Dprintf' [-Wunused-function]
    static void Dprintf(const char *fmt, ...) {}
                ^
    1 warning generated.
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.2 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090504 -DHAVE_LO64=1 -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.5.4/include -I/usr/local/Cellar/postgresql/9.5.4/include/server -c psycopg/typecast.c -o build/temp.macosx-10.6-intel-3.5/psycopg/typecast.o
    psycopg/typecast.c:494:5: warning: incompatible pointer types initializing 'PyAsyncMethods *' with an expression of type 'int (PyObject *, PyObject *)' (aka 'int (struct _object *, struct _object *)') [-Wincompatible-pointer-types]
        typecast_cmp, /*tp_compare*/
        ^~~~~~~~~~~~
    1 warning generated.
    /usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g -Qunused-arguments -Qunused-arguments build/temp.macosx-10.6-intel-3.5/psycopg/psycopgmodule.o build/temp.macosx-10.6-intel-3.5/psycopg/green.o build/temp.macosx-10.6-intel-3.5/psycopg/pqpath.o build/temp.macosx-10.6-intel-3.5/psycopg/utils.o build/temp.macosx-10.6-intel-3.5/psycopg/bytes_format.o build/temp.macosx-10.6-intel-3.5/psycopg/connection_int.o build/temp.macosx-10.6-intel-3.5/psycopg/connection_type.o build/temp.macosx-10.6-intel-3.5/psycopg/cursor_int.o build/temp.macosx-10.6-intel-3.5/psycopg/cursor_type.o build/temp.macosx-10.6-intel-3.5/psycopg/diagnostics_type.o build/temp.macosx-10.6-intel-3.5/psycopg/error_type.o build/temp.macosx-10.6-intel-3.5/psycopg/lobject_int.o build/temp.macosx-10.6-intel-3.5/psycopg/lobject_type.o build/temp.macosx-10.6-intel-3.5/psycopg/notify_type.o build/temp.macosx-10.6-intel-3.5/psycopg/xid_type.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_asis.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_binary.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_datetime.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_list.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pboolean.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pdecimal.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pint.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_pfloat.o build/temp.macosx-10.6-intel-3.5/psycopg/adapter_qstring.o build/temp.macosx-10.6-intel-3.5/psycopg/microprotocols.o build/temp.macosx-10.6-intel-3.5/psycopg/microprotocols_proto.o build/temp.macosx-10.6-intel-3.5/psycopg/typecast.o -L/usr/local/lib -lpq -lssl -lcrypto -o build/lib.macosx-10.6-intel-3.5/psycopg2/_psycopg.cpython-35m-darwin.so
    ld: library not found for -lssl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command '/usr/bin/clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mn/t5nqmwlj5wb99lyzrkq_d0qc0000gn/T/pip-build-darwcjmh/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/mn/t5nqmw

是否有其他人遇到此问题或有解决此问题的方法?

1 个答案:

答案 0 :(得分:2)

升级后你可能没有重新安装xcode?

xcode-select --install