错误:为psycopg2-MacOS Mojave 10.14.16 python 3构建轮子失败



我在尝试安装psycopg2时遇到此问题

$ pip install psycopg2 ...
.
.
ERROR: Failed building wheel for psycopg2

如果尝试,也会发生这种情况

$ pip install psycopg2

我在MacOS Mojave 10.14.16中使用virtualenv,我不记得在更新操作系统之前遇到过这个问题。

我遇到了类似的问题,我通过Homebrew安装了openssl并手动将我的自制安装的openssl链接到pip:

env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2

另外,如果在运行上一个命令之前没有安装命令行工具,请运行

xcode-select --install

我希望这能帮助你,它在10.13 High Sierra为我工作,如果它不能解决问题,请提供完整的错误跟踪,以帮助你

最新更新