错误: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,我不记得在更新操作系统之前遇到此问题。

liuqingshuai113 回答:错误:psycopg2的构建轮失败-MacOS Mojave 10.14.16 python 3

我遇到了类似的问题,并修复了它通过Homebrew安装openssl并手动将我的由homebrew安装的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中为我工作,以防无法解决问题,请提供完整的错误跟踪信息以帮助您

本文链接:https://www.f2er.com/3122820.html

大家都在问