Trying to install psycopg2 using pip 19.1 on MacOS 10.14.4 returns the lengthy error message below. I understand there are warnings related to gcc, but given the actual error me
I had this problem running pip install psycopg2 while I was running OSX 10.14.6. I fixed it by running this simple command:
sudo ln -s /Applications/Postgres.app/Contents/Versions/latest/bin/pg_config /usr/local/bin/pg_config
it asked for my password
ln: /usr/local/bin/pg_config: File exists( than this appeared)
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
(then I ran the command above)
(than i ran the code above. keep in mind I'm running python 3.7 in my virtual environment and I don't have to use python3 pip3 install pyscopg2.)
6.Successfully installed psycopg2-2.8.4