【发布时间】:2018-11-10 00:06:53
【问题描述】:
在使用“SIP”安装 El Capitan 后,我在使用自制软件和 psycopg2 时遇到了问题。
睡着后,我的 Mac 会随机拒绝登录,需要先重新启动。 Apple Capture Data 应用程序指出自制软件是罪魁祸首。互联网上有一些修复,如果 homebrew 位于那里,则允许用户写入 /usr/local。见http://digitizor.com/fix-homebrew-permissions-osx-el-capitan/
剩下的相关问题是“如何安装 psycopg2”。互联网上有一些修复程序,但它们并没有为我解决问题。
我在 pip install psycopg2
的详细输出末尾得到这个building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.11-x86_64-3.5
creating build/temp.macosx-10.11-x86_64-3.5/psycopg
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes arch x86_64 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.1 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090405 -DHAVE_LO64=1 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I. -I/usr/local/Cellar/postgresql/9.4.5_2/include -I/usr/local/Cellar/postgresql/9.4.5_2/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.11-x86_64-3.5/psycopg/psycopgmodule.o
clang: error: no such file or directory: 'arch'
clang: error: no such file or directory: 'x86_64'
error: command 'clang' failed with exit status 1
和
Command "/usr/local/opt/python3/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/var/folders/bj/chzjff753fz0hr1l5r9kcc1c0000gn/T/pip-build-h9jxgxsp/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bj/chzjff753fz0hr1l5r9kcc1c0000gn/T/pip-2uer9v1a-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/bj/chzjff753fz0hr1l5r9kcc1c0000gn/T/pip-build-h9jxgxsp/psycopg2
【问题讨论】:
标签: python macos postgresql