如何使用pip3安装psycopg2?

2024-04-23 18:24:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Mac上运行“pip3 install psycopg2”时遇到了这个错误。在

我想第一次安装psycopg2。在

...
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
...

我试过pip,从GitHub安装。然而,两者都失败了。在

有人能帮帮我吗?我真的很感激!在


Tags: installtopyforstatuswithsetupexit
1条回答
网友
1楼 · 发布于 2024-04-23 18:24:25

我终于有了一些工作,从浏览这些伟大的人谁评论了我的帖子分享以上链接。在

brew upgrade postgresql
sudo pip install psycopg2

谢谢大家的帮助!在

相关问题 更多 >