简体   繁体   中英

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

Command line tools are installed

MacOS 10.15

This is likely because you don't have the PostgreSQL devel library installed. 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 .

You can probably just install the binary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM