软件包安装失败 - OsX中的psycopg2

问题描述 投票:4回答:2

我尝试为Python安装postgresQL适配器:

$ pipenv install psycopg2

我收到了这个错误:

Installing dependencies from Pipfile.lock (45527d)…
An error occurred while installing psycopg2==2.8.2...

错误堆栈太长了,这里是最后一行:

(...)bin/../include/site/python3.7/psycopg2" failed with error code 1 in /private/var/folders/wq/wp6z48kj7_z3ynpkchsmqjp80000gn/T/pip-install-8ffakjrp/psycopg2/']

有什么提示吗?

python-3.x postgresql psycopg2
2个回答
1
投票

用这个:

  1. pipenv clean
  2. pipenv install psycopg2-binary

1
投票

我解决了安装其他libs的二进制文件的问题。这是:

$ brew install libxml2 libxmlsec1 pkg-config
$ pipenv install psycopg2-binary
© www.soinside.com 2019 - 2024. All rights reserved.