[英]Installing psycopg2 command 'gcc' failed with exit status 1
I'm trying to install psycopg2 but pip install psycopg2
brings to error: command 'gcc' failed with exit status 1我正在尝试安装 psycopg2 但
pip install psycopg2
导致错误:命令“gcc”失败,退出状态为 1
Command line tools are installed命令行工具已安装
MacOS 10.15 macOS 10.15
This is likely because you don't have the PostgreSQL devel library installed.这可能是因为您没有安装 PostgreSQL 开发库。 You have a few options:
你有几个选择:
(1) Install the binary with pip install psycopg2-binary
(2) Install PostgreSQL with HomeBrew: brew install postgresql
, then pip install psycopg2
. (1) Install the binary with
pip install psycopg2-binary
(2) Install PostgreSQL with HomeBrew: brew install postgresql
, then pip install psycopg2
.
You can probably just install the binary.您可能只安装二进制文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.