2

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

Kovats
  • 21
  • 2

2 Answers2

4

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.

FlipperPA
  • 13,607
  • 4
  • 39
  • 71
0

after updating the pip package error went away

To Update python3 pip package

wget https://bootstrap.pypa.io/get-pip.py
 
/usr/bin/python3 get-pip.py 
Manju N
  • 886
  • 9
  • 14