I had a similar result when installing psycopg2 in my own computer, and sudoing pip install --upgrade psycopg2 solve my problem. I did not try without the option --upgrade for sage, but I also ran sage -pip install --upgrade pyscopg2 and no problema!