Can't install psycopg2 with pip in virtualenv on Mac OS X 10.7
I am using MAC OS CATALINA verison 10.15.5 with python3 and psql (PostgreSQL) 12.3. Here is what worked for me:
Try installing openssl using brew
brew install openssl
after that export these variables in the terminal.
export LDFLAGS="-L/usr/local/opt/openssl/lib"export CPPFLAGS="-I/usr/local/opt/openssl/include"
verify these variables have been exported by echo $LDFLAGS
and after that you are good to go with installation of psycopg2 by typing
pip3 install psycopg2