Error installing psycopg2 python 3.7 on macos 10.15

If you're new to Django (as I am), you may want to try psycopg2-binary instead. It's meant for developers and testing, but not production use. I'm using the same version of Python (3.7), Django version 2.2.6 in a virtual environment on Mac OS Mojave. I couldn't install pyscopg2 on my system either.

pip install pyscopg2-binary

These are the docs that I used to help me figure this out: http://initd.org/psycopg/docs/install.html#install-from-source https://pypi.org/project/psycopg2-binary/


I could solve this problem by installing the binary library which is indicated in the comment above. (It just has a typo error)

pip install psycopg2-binary

The error from Amol Chakane refers but to a PIP error referring to a package that wasn't found because of misspelling.

Make sure also that your pip command is referring to the right Python version. In my case, I'm using an environment with Python 3 and I don't need to specify pip3 but just pip