I do not think it is a psycopg2 issue because, as you can see in the passing and failing builds, the exact same version of psycopg2 is being installed (2.7.7), with the same checksum.
I believe this is either a travis issue, or an issue in the way travis packages/installs Python 3.8.