Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装Python3的psycopg2_Python_Pip_Psycopg2 - Fatal编程技术网

安装Python3的psycopg2

安装Python3的psycopg2,python,pip,psycopg2,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 collecte

我在使用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

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

可能是因为升级后您没有重新安装xcode

xcode-select --install

也许,升级后您没有重新安装xcode

xcode-select --install

1.该文本中没有实际的错误消息。找出实际的错误。2.将为Mac下载的pip是源版本。它们是您可以使用的Mac的预构建本机软件包吗?您的带有更多详细信息的编辑(如jpmc26所建议的)非常清楚,其中包含错误消息:“ld:library not found for-lssl”。安装libssl。(
/usr/local/bin/python3
建议您使用的是自制软件。如果您使用,请尝试
brew安装openssl
)。尝试此操作后,我遇到了相同的错误1。该文本中没有实际的错误消息。找出实际的错误。2.将为Mac下载的pip是源版本。它们是您可以使用的Mac的预构建本机软件包吗?您的带有更多详细信息的编辑(如jpmc26所建议的)非常清楚,其中包含错误消息:“ld:library not found for-lssl”。安装libssl。(
/usr/local/bin/python3
建议您使用的是自制软件。如果您使用,请尝试
brew安装openssl
)。尝试后,我遇到了相同的错误您是一个救生员!你知道为什么会出现这个问题吗?在每次OSX升级之后执行这个命令是件好事吗?新版本的OS和xcode同时发布。也许,mac os需要新版本的xcode。你是个救命稻草!你知道为什么会出现这个问题吗?在每次OSX升级之后执行这个命令是件好事吗?新版本的OS和xcode同时发布。可能是,mac os需要新版本的xcode。