pip install pycopg2
pip install psycopg2-binary
Lienus
pip install psycopg2-binary
#Use psycopg2-binary instead of psycopg2.
pip install psycopg2-binary
pip3 install psycopg2-binary # for version 3 and up