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
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.
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