小编raw*_*ain的帖子

在 macOS 上安装 psycopg2 失败

我已经PostgreSQL在 macOS 上通过 brew安装了:

brew install postgresql
Run Code Online (Sandbox Code Playgroud)

尝试了这些命令,都失败了:

  • pipenv 安装 psycopg2
  • pip 安装 psycopg2

错误:

brew install postgresql
Run Code Online (Sandbox Code Playgroud)

此外,将其设置为 shell 然后重新加载:

...
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -DPSYCOPG_VERSION=2.8.4 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120001 -DHAVE_LO64=1 -I/Users/user0/.pyenv/versions/3.8.0/include/python3.8 -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/adapter_qstring.c -o build/temp.macosx-10.14-x86_64-3.8/psycopg/adapter_qstring.o
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -DPSYCOPG_VERSION=2.8.4 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120001 -DHAVE_LO64=1 -I/Users/user0/.pyenv/versions/3.8.0/include/python3.8 -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/microprotocols.c -o build/temp.macosx-10.14-x86_64-3.8/psycopg/microprotocols.o
  clang -Wno-unused-result …
Run Code Online (Sandbox Code Playgroud)

python macos pip psycopg2 pipenv

2
推荐指数
2
解决办法
1643
查看次数

标签 统计

macos ×1

pip ×1

pipenv ×1

psycopg2 ×1

python ×1