In case anyone was using ipython, make sure to pip install ipython and make sure it is up-to-date before executing import commands with psycopg
pip install ipython