If you prefer to avoid building psycopg2 from source, please install the PyPI 'psycopg2-binary' package instead. is installed code example
Example: psycopg2-binary install
pip install psycopg2-binary
pip install psycopg2-binary