I was running python 3.8 and so installing psycopg2==2.8.4 was necessary. (psycopg2-binary-2.9.10 didnt work)